semitwist.util.io

Undocumented in source.

Members

Functions

byteSwap16
immutable(T)[] byteSwap16(const(T)[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
byteSwap32
immutable(T)[] byteSwap32(const(T)[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
byteSwapInPlace
void byteSwapInPlace(T[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
byteSwapVal16
ushort byteSwapVal16(ushort value)
Undocumented in source. Be warned that the author may not have intended to support it.
byteSwapVal32
uint byteSwapVal32(uint value)
Undocumented in source. Be warned that the author may not have intended to support it.
getExec
string getExec()

Gets the full path to the currently running executable, regardless of working directory or PATH env var or anything else. Note that this is far more accurate and reliable than using args[0]. ditto

getExecName
string getExecName()

Like getExec, but doesn't include the path.

getExecPath
string getExecPath()

Like getExec, but only returns the path (including trailing path separator).

readStringz
T readStringz(std.stream.File reader)
Undocumented in source. Be warned that the author may not have intended to support it.
readUTFFile
TOut readUTFFile(TFilename filename)

Reads any type of Unicode/UTF text file (UTF-8, UTF-16, UTF-32, big or little endian), detects BOM, and automatically converts it to native endianness and whatever string type is specified in TOut.

toEndian
T toEndian(T data, Endian en)
Undocumented in source. Be warned that the author may not have intended to support it.
utfConvert
TOut utfConvert(immutable(TInChar)[] data)

Converts any type of Unicode/UTF string with or without a BOM (UTF-8, UTF-16, UTF-32, big or little endian), strips the BOM (if it exists), and automatically converts it to native endianness and whatever string type is specified in TOut.

Meta