workspaced.helpers

Undocumented in source.

Members

Aliases

isIdentifierSeparatingChar
deprecated alias isIdentifierSeparatingChar = isDIdentifierSeparatingChar
Undocumented in source.

Functions

binarySearch
ptrdiff_t binarySearch(T[] arr, T value)

Finds a value in a sorted range and returns its index.

determineIndentation
string determineIndentation(const(char)[] code)
Undocumented in source. Be warned that the author may not have intended to support it.
endsWithKeyword
bool endsWithKeyword(const(char)[] code, string keyword)
Undocumented in source. Be warned that the author may not have intended to support it.
existsAndIsDir
bool existsAndIsDir(string file)
Undocumented in source. Be warned that the author may not have intended to support it.
existsAndIsFile
bool existsAndIsFile(string file)
Undocumented in source. Be warned that the author may not have intended to support it.
getIdentifierAt
inout(char)[] getIdentifierAt(inout(char)[] code, size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
indexOfKeyword
ptrdiff_t indexOfKeyword(const(char)[] code, string keyword, ptrdiff_t start)
Undocumented in source. Be warned that the author may not have intended to support it.
insertSorted
size_t insertSorted(T[] arr, T value)
insertSortedNoDup
size_t insertSortedNoDup(T[] arr, T value)

Inserts a value into a sorted range. Inserts before equal elements.

isDIdentifierSeparatingChar
bool isDIdentifierSeparatingChar(dchar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isIdentifierChar
bool isIdentifierChar(dchar c)
Undocumented in source. Be warned that the author may not have intended to support it.
isValidDIdentifier
bool isValidDIdentifier(const(char)[] s)
Undocumented in source. Be warned that the author may not have intended to support it.
runTestDataFileTests
void runTestDataFileTests(string dir, void delegate() onFileStart, void delegate(string code, string variable, JSONValue value) setVariable, void delegate(string code, string[] parts, string line) onTestLine, void delegate(string code) onFileFinished, string __file, size_t __line)

Iterates over all files in the given folder, reads them as D files until a __EOF__ token is encountered, then parses the following lines in this format per file: - If the line is empty or starts with // ignore it - If the line starts with : it's a variable assignment in form :variable=JSON - Otherwise it's a tab separated line like 1 2 3 Finally, it's tested that at least one test has been tested.

statFile
bool statFile(R name, uint* attributes, SysTime* writeTime, ulong* size)

same as getAttributes without throwing

stripLineEndingLength
int stripLineEndingLength(const(char)[] code)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta