parin.joka.types

The types module provides basic type definitions, compile-time functions and ASCII string helpers.

Types 46

aliasSz = size_t

The result of sizeof.

aliasPd = ptrdiff_t

The result of pointer math.

aliasStr = char[]

A string slice of chars.

aliasStr16 = wchar[]

A string slice of wchars.

aliasStr32 = dchar[]

A string slice of dchars.

aliasIStr = const(char)[]

A string slice of constant chars.

aliasIStr16 = const(wchar)[]

A string slice of constant wchars.

aliasIStr32 = const(dchar)[]

A string slice of constant dchars.

aliasStrz = char *

A C string of chars.

aliasStrz16 = wchar *

A C string of wchars.

aliasStrz32 = dchar *

A C string of dchars.

aliasIStrz = const(char) *

A C string of constant chars.

aliasIStrz16 = const(wchar) *

A C string of constant wchars.

aliasIStrz32 = const(dchar) *

A C string of constant dchars.

aliasUnionType = ubyte

The common union type for all tagged unions.

aliasGen = uint

The type of a generation.

aliasAliasArgs(A...) = A

The type of compile time alias arguments.

aliasEchonFunc = void function(IStr[] text...) @safe nothrow @nogc

Callback that can be used for basic printing. Should work like the echo -n command in POS*X compliant shells.

Callback that can be used for basic printing. Should work like the echo command in POS*X compliant shells.

enumFault : ubyte

A type representing error values.

noneNot an error.
someA generic error.
bugAn implementation error.
assertionAn assertion error.
invalidAn invalid data error.
overflowAn overflow error.
rangeA range violation error.
timeoutA timeout error.
interruptedAn interrupted error.
unconfiguredA missing configuration error.
unauthorizedA permission or access rights error.
unrecognizedAn unknown or unsupported type error.
cannotFindA wrong path error.
cannotCreateA creation permissions error.
cannotDestroyA destruction permissions error.
cannotOpenAn open permissions error.
cannotCloseA close permissions error.
cannotReadA read permissions error.
cannotWriteA write permissions error.
structNoData

A type marker for types that support "no data" things. The Rust Result type is a good example of working with types like this.

structhiddenMember

An attribute for types that support hiding members. Can be used for UI elements, for example.

structrequiredMember

An attribute for types that support requiring members. Can be used for configurations, for example.

structIndexedValue(V)

A value paired with its iteration index.

Fields
Sz index
V value
structKeyValuePair(K, V)

A value paired with its associated key.

Fields
K key
V value
structGenIndex

A generational index.

Fields
Sz value
Gen generation
invalidDataData indicating an error.
invalidIndexAn invalid generational index.
Methods
bool isNone() @safe nothrow @nogcReturns true if the index is invalid.
bool isSome() @safe nothrow @nogcReturns true if the index is valid.
structStaticArray(T, Sz N)

A static array. It exists because of a BetterC + struct[N] issue (missing symbol).

Fields
ubyte[T.sizeof * N] _data
lengthThe length of the array.
capacityThe capacity of the array.
Methods
inout(T)[] items() @trusted nothrow @nogc inoutReturns the items of the array.
Constructors
this(const(T)[] items...)Makes a static array. Passing a slice with a length larger than the array capacity will throw an error.
structForeignSlice(T)

A slice using a foreign memory layout. Useful for interfacing with languages that define slices differently.

Fields
T * ptr
Sz length
Methods
void opAssign(T[] slice) @trusted nothrow @nogcCopies the given D slice.
inout(T)[] items() @trusted nothrow @nogc inoutReturns the items of the slice.
Constructors
this(T * ptr, Sz length)Creates a slice from parts.
this(T[] slice)Copies the given D slice.
structGBitSet(T) if (__traits(isUnsigned, T))

A generic static bit set.

Fields
T bits
zeroTyped zero constant.
oneTyped one constant.
capacityThe capacity of the bit set.
Methods
Sz length() @trusted nothrow @nogcReturns the number of set bits.
auto activeBits() @trusted nothrow @nogcReturns a range over the indices of all set bits.
int findLowestActiveBit() @trusted nothrow @nogcReturns the index of the lowest active bit, or -1 if no bits are set.
int findHighestActiveBit() @trusted nothrow @nogcReturns the index of the highest active bit, or -1 if no bits are set.
bool any() @trusted nothrow @nogcReturns true if any bit is set.
bool none() @trusted nothrow @nogcReturns true if no bit is set.
bool all() @trusted nothrow @nogcReturns true if all bits are set.
void flip(Sz i) @trusted nothrow @nogcFlips the bit at the given index.
void fill() @trusted nothrow @nogcSets all bits.
void clear() @trusted nothrow @nogcClears all bits.
bool opIndex(Sz i) @trusted nothrow @nogcReturns the value of a bit.
void opIndexAssign(const(bool) rhs, Sz i) @trusted nothrow @nogcSets the value of a bit.

The common bit set data type.

The common bit set type.

structMaybe(T)

Represents an optional value with an error code. Errors are referred to as faults in Joka. The default value is an empty value.

Fields
Fault _fault
T _data
Methods
void opAssign(in const(T) rhs) @trusted @safe nothrow @nogcCreates a value.
void opAssign(Fault rhs) @safe nothrow @nogcCreates a fault.
void opAssign(in Maybe!T rhs) @trusted @safe nothrow @nogcCopies the state of another optional value.
Fault fault() @safe nothrow @nogcReturns the fault.
T xx() @safe nothrow @nogcReturns the value without checking if it exists.
T get(ref Fault trap) @safe nothrow @nogcReturns the value and traps the fault check to avoid an assert.
T getOr() @safe nothrow @nogcReturns the value. Returns a default value when there is a fault.
T getOr(T other) @safe nothrow @nogcReturns the value. Returns a default value when there is a fault.
T getOrAssert(IStr text = "Fault was detected.") @safe nothrow @nogcReturns the value, or asserts if a fault exists.
bool isNone() @safe nothrow @nogc constReturns true when there is a fault.
bool isSome() @safe nothrow @nogc constReturns true when there is a value.
void clear() @safe nothrow @nogcClears the value, making it none.
Constructors
this(in const(T) data)Creates a value.
this(Fault fault)Creates a fault.
this(in const(T) data, Fault fault)Creates a value if fault is none.

Maybe not.

aliasNotSure = Maybe

Not sure.

structOption(T)

Represents an optional value. Prefer using Maybe in most cases.

Note

the isSome member depends on T.

If T is a value, then isSome is a field. If T is a pointer, then isSome is a property. The default value is an empty value.

Fields
isPtrTrue if `T` is a pointer.
T _data
Methods
void opAssign(in const(T) rhs) @trusted nothrow @nogcCreates a value.
void opAssign(in Option!T rhs) @trusted nothrow @nogcCopies the state of another optional value.
T xx() @trusted nothrow @nogcReturns the value without checking if it exists.
T get(ref bool trap) @trusted nothrow @nogcReturns the value and traps the `isSome` check to avoid an assert.
T getOr() @trusted nothrow @nogcReturns the value. Returns a default value when there is none.
T getOr(T other) @trusted nothrow @nogcReturns the value. Returns a default value when there is none.
T getOrAssert(IStr text = "Fault was detected.") @trusted nothrow @nogcReturns the value, or asserts if it does not exists.
bool isNone() @trusted nothrow @nogc constReturns true when there is no value.
bool isSome() @trusted nothrow @nogc constReturns true when there is a value.
void clear() @trusted nothrow @nogcClears the value, making it none.
Constructors
this(in const(T) data)Creates a value.
structResult(T, E, Sz tagSize = 0)

Represents a success or error value. Prefer using Maybe in most cases.

Fields
Tag _isSome
ResultUnion _data
Methods
void opAssign(in const(T) rhs) @trusted nothrow @nogcCreates a value.
void opAssign(in const(E) rhs) @trusted nothrow @nogcCreates an error.
void opAssign(in Result!(T, E) rhs) @trusted nothrow @nogcCopies the state of another result value.
bool isSome() @trusted nothrow @nogcReturns true if it is some value.
T xx() @trusted nothrow @nogcReturns the value without checking if it exists.
T get(ref E trap) @trusted nothrow @nogcReturns the value and traps the `isSome` check to avoid an assert.
T getOr() @trusted nothrow @nogcReturns the value. Returns a default value when there is none.
T getOr(T other) @trusted nothrow @nogcReturns the value. Returns a default value when there is none.
T getOrAssert(IStr text = "Fault was detected.") @trusted nothrow @nogcReturns the value, or asserts if it does not exists.
bool isNone() @trusted nothrow @nogc constReturns true when there is an error.
void clear() @trusted nothrow @nogcClears the value, making it none.
Constructors
this(in const(T) value)Creates a value.
this(in const(E) value)Creates an error.
structUnion(A...) if (A.length != 0)

A tagged union.

Fields
UnionType _type
UnionData _data
isBaseAliasingSafeReturns true if all union members share a common first field.
Methods
@trusted auto call(IStr func, AA...)(AA args)Calls the given method for the currently active type. All types must implement this method.
UnionType type() @trusted nothrow @nogcThe currently active type.
bool isType(T)() @trusted nothrow @nogcReturns true if the given type is the same as the currently active type.
Base base() @trusted nothrow @nogc refReturns the data of the first union member. Only safe to use if all union members share a common first field.
T as(T)() @trusted nothrow @nogc refReturns the data of the given type. Will assert if the type is not the same as the currently active type.
Nested Templates
typeOf(T)Returns the type of the given type.
aliastoForeign = toForeignMaybe
aliastoForeign = toForeignSlice

Path separator style.

nativeThe platform's default separator.
posixThe `/` separator.
windowsThe `\` separator.
structSep

A separator marker for printing.

Fields
IStr value
structStrPair

A string pair.

Fields
structFloating

A wrapper type for priting floats and doubles.

Fields
double value
uint precision
Methods
IStr toStr() @safe nothrow @nogcReturns a temporary string representation.
aliasremovePrefix = trimStart

Removes the specified prefix from the beginning of the string if it exists.

aliasremoveSuffix = trimEnd

Removes the specified suffix from the end of the string if it exists.

Iteration object over lines of text.

Fields
IStr view
IStr slice
bool canTrim
Methods
bool empty() @safe nothrow @nogc
IStr front() @safe nothrow @nogc
void popFront() @safe nothrow @nogc
Constructors
this(IStr view, bool canTrim = false)

Functions 121

fnIStr typeName(U)(in const(U) unionValue) if (is(U : Union!A, A...))Returns the current type name of the union.
fnT toUnion(T)(UnionType type) if (is(T : Union!A, A...))Returns a union from a union type.
fnT toUnion(T)(IStr typeName) if (is(T : Union!A, A...))Returns a union from a union type name.
fnR[N] castToArray(R, T, Sz N)(ref T[N] from) @trustedCasts each element of a fixed-size array to a new element type.
fnIStr indexErrorMessage(Sz i) @trusted nothrow @nogcReturns an error message that can be used for array-like objects.
fnOption!T toForeignMaybe(T)(Maybe!T value) @safe nothrow @nogcReturns an option from a maybe.
fnForeignSlice!T toForeignSlice(T)(T[] value) @safe nothrow @nogcReturns an foreign slice from a D slice.
fnForeignSlice!(const(ubyte)) toForeignBytes(const(char)[] value) @safe nothrow @nogc @trustedReturns an foreign slice from a D slice.
fnForeignSlice!(ubyte) toForeignBytesMut(char[] value) @safe nothrow @nogc @trustedReturns an foreign slice from a D slice.
fnbool isNan(float x) @safe nothrow @nogcReturns true is value is NaN.
fnbool isNan(double x) @safe nothrow @nogcReturns true is value is NaN.
fnT abs(T)(T x) @safe nothrow @nogcReturns the absolute value of `x`.
fnT min(T)(T a, T b) @safe nothrow @nogcReturns the smaller of `a` and `b`.
fnT min3(T)(T a, T b, T c) @safe nothrow @nogcReturns the smallest of `a`, `b`, and `c`.
fnT min4(T)(T a, T b, T c, T d) @safe nothrow @nogcReturns the smallest of `a`, `b`, `c`, and `d`.
fnT max(T)(T a, T b) @safe nothrow @nogcReturns the larger of `a` and `b`.
fnT max3(T)(T a, T b, T c) @safe nothrow @nogcReturns the largest of `a`, `b`, and `c`.
fnT max4(T)(T a, T b, T c, T d) @safe nothrow @nogcReturns the largest of `a`, `b`, `c`, and `d`.
fnT sign(T)(T x) @safe nothrow @nogcReturns -1 if `x` is negative, 1 if positive, or 0 if zero.
fnT clamp(T)(T x, T a, T b) @safe nothrow @nogcReturns `x` clamped to the range [`a`, `b`].
fnfloat basicFloor(float x) @safe nothrow @nogcReturns the floor of `x` using a basic cast-based implementation.
fndouble basicFloor64(double x) @safe nothrow @nogcReturns the floor of `x` using a basic cast-based implementation.
fnfloat basicRound(float x) @safe nothrow @nogcReturns the nearest integer to `x` using a basic cast-based implementation.
fndouble basicRound64(double x) @safe nothrow @nogcReturns the nearest integer to `x` using a basic cast-based implementation.
fnfloat basicCeil(float x) @safe nothrow @nogcReturns the ceiling of `x` using a basic cast-based implementation.
fndouble basicCeil64(double x) @safe nothrow @nogcReturns the ceiling of `x` using a basic cast-based implementation.
fnint findInAliasArgs(T, A...)() @__ctfeReturns the index of an item inside the given alias arguments or -1 on error.
fnbool isInAliasArgs(T, A...)() @__ctfeReturns true if an item is inside the given alias arguments.
fnIStr toStr(T)(T value) @trusted @safeConverts the value to its string representation.
fnIStr fmtIntoBufferWithStrs(Str buffer, IStr fmtStr, IStr[] args...) @trusted nothrow @nogc @safeFormats the given string by replacing `{}` placeholders with argument values in order. Options within placeholders are not supported. For custom formatting use a wrapper type with a `toStr` method....
fnIStr fmtIntoBuffer(A...)(Str buffer, IStr fmtStr, A args) @trusted @safeFormats the given string by replacing `{}` placeholders with argument values in order. Options within placeholders are not supported. For custom formatting use a wrapper type with a `toStr` method....
fnIStr fmtIntoBuffer(A...)(Str buffer, InterpolationHeader header, A args, InterpolationFooter footer) @safe
fnIStr fmt(A...)(IStr fmtStr, A args) @trusted @safeFormats into an internal static ring buffer and returns the slice. The slice is temporary and may be overwritten by later calls to `fmt`. For details on formatting, see the `fmtIntoBuffer` function.
fnIStr fmt(A...)(InterpolationHeader header, A args, InterpolationFooter footer) @safe
fnIStr fmtSignedGroup(IStr[] fmtStrs, long[] args...) @safe nothrow @nogcFormats into an internal static ring buffer and returns the slice. This function can be used for types that create a lot of template bloat. Example: GVec2, GVec3, GVec4, GRect, ...
fnIStr fmtFloatingGroup(IStr[] fmtStrs, double[] args...) @safe nothrow @nogcFormats into an internal static ring buffer and returns the slice. This function can be used for types that create a lot of template bloat. Example: GVec2, GVec3, GVec4, GRect, ...
fnnoreturn debugTodo(bool errorInRelease = true)(IStr text, IStr file = __FILE__, Sz line = __LINE__) @safe nothrow @nogcHalts the program with a TODO message indicating unimplemented code. Debug builds: runtime assert. Release builds: runtime assert or compile-time error.
fnuint hashFnv32a(IStr text) @safe nothrow @nogcHashes a string using the FNV-1a algorithm with a 32-bit output.
fnulong hashFnv64a(IStr text) @safe nothrow @nogcHashes a string using the FNV-1a algorithm with a 64-bit output.
fnFloating flo(double value, uint precision) @safe nothrow @nogcWraps a floating value with formatting options.
fnbool isDigit(char c) @safe nothrow @nogcReturns true if the character is a digit (0-9).
fnbool isUpper(char c) @safe nothrow @nogcReturns true if the character is an uppercase letter (A-Z).
fnbool isLower(char c) @safe nothrow @nogcReturns true the character is a lowercase letter (a-z).
fnbool isAlpha(char c) @safe nothrow @nogcReturns true if the character is an alphabetic letter (A-Z, a-z).
fnbool isAlphaOrDigit(char c) @safe nothrow @nogcReturns true if the character is an alphabetic letter (A-Z, a-z) or a digit (0-9).
fnbool isSpace(char c) @safe nothrow @nogcReturns true if the character is a whitespace character (space, tab, ...).
fnbool isSymbol(char c) @safe nothrow @nogcReturns true if the character is a symbol (!, ", ...).
fnbool isHexDigit(char c) @safe nothrow @nogcReturns true if the character is a hexadecimal digit (0-9, A-F, a-f).
fnbool isAutocompleteSep(char c) @safe nothrow @nogcReturns true if the character is a autocomplete separator.
fnbool isVariableNameStart(char c) @safe nothrow @nogcReturns true if the character can start a variable name (letter or underscore).
fnbool isVariableNamePart(char c) @safe nothrow @nogcReturns true if the character can appear in a variable name (letter, digit, or underscore).
fnbool isVariableName(IStr str) @safe nothrow @nogcReturns true if the string is a valid variable name (starts with a letter or underscore, followed by letters, digits, or underscores).
fnbool isStrz(IStr str) @safe nothrow @nogcReturns true if the string represents a C string.
fnchar toUpper(char c) @safe nothrow @nogcConverts the character to uppercase if it is a lowercase letter.
fnchar toLower(char c) @safe nothrow @nogcConverts the character to lowercase if it is an uppercase letter.
fnStr toUpper(Str str) @safe nothrow @nogcConverts all lowercase letters in the string to uppercase.
fnStr toLower(Str str) @safe nothrow @nogcConverts all uppercase letters in the string to lowercase.
fnSz strzLength(IStrz str) @safe nothrow @nogc @trustedReturns the length of the C string.
fnbool equalsNoCase(IStr str, IStr other) @safe nothrow @nogcReturns true if the two strings are equal, ignoring case.
fnbool startsWith(IStr str, IStr start) @safe nothrow @nogcReturns true if the string starts with the specified substring.
fnbool startsWith(IStr str, char start) @safe nothrow @nogcReturns true if the string starts with the specified character.
fnbool endsWith(IStr str, IStr end) @safe nothrow @nogcReturns true if the string ends with the specified substring.
fnbool endsWith(IStr str, char end) @safe nothrow @nogcReturns true if the string ends with the specified character.
fnint countItem(IStr str, IStr item) @safe nothrow @nogcCounts the number of occurrences of the specified substring in the string.
fnint countItem(IStr str, char item) @safe nothrow @nogcCounts the number of occurrences of the specified character in the string.
fnint findStart(IStr str, IStr item) @safe nothrow @nogcFinds the starting index of the first occurrence of the specified substring in the string, or returns -1 if not found.
fnint findStart(IStr str, char item) @safe nothrow @nogcFinds the starting index of the first occurrence of the specified character in the string, or returns -1 if not found.
fnint findEnd(IStr str, IStr item) @safe nothrow @nogcFinds the ending index of the first occurrence of the specified substring in the string, or returns -1 if not found.
fnint findEnd(IStr str, char item) @safe nothrow @nogcFinds the ending index of the first occurrence of the specified character in the string, or returns -1 if not found.
fnint findItem(IStr[] items, IStr item) @safe nothrow @nogcFinds the first occurrence of the specified item in the slice, or returns -1 if not found.
fnint findItem(IStr[] items, char item) @safe nothrow @nogcFinds the first occurrence of the specified item in the slice, or returns -1 if not found.
fnint findItemThatStartsWith(IStr[] items, IStr start) @safe nothrow @nogcFinds the first occurrence of the specified start in the slice, or returns -1 if not found.
fnint findItemThatStartsWith(IStr[] items, char start) @safe nothrow @nogcFinds the first occurrence of the specified start in the slice, or returns -1 if not found.
fnint findItemThatEndsWith(IStr[] items, IStr end) @safe nothrow @nogcFinds the first occurrence of the specified end in the slice, or returns -1 if not found.
fnint findItemThatEndsWith(IStr[] items, char end) @safe nothrow @nogcFinds the first occurrence of the specified end in the slice, or returns -1 if not found.
fnIStr trimStart(IStr str, IStr pattern = "") @safe nothrow @nogcRemoves whitespace characters from the beginning of the string. Value `pattern` can be used to trim a specific pattern from the start (e.g. "temp.") instead of whitespace.
fnIStr trimStart(IStr str, char pattern) @safe nothrow @nogcRemoves whitespace characters from the beginning of the string. Value `pattern` can be used to trim a specific pattern from the start (e.g. "temp.") instead of whitespace.
fnIStr trimEnd(IStr str, IStr pattern = "") @safe nothrow @nogcRemoves whitespace characters from the end of the string. Value `pattern` can be used to trim a specific pattern from the end (e.g. ".txt") instead of whitespace.
fnIStr trimEnd(IStr str, char pattern) @safe nothrow @nogcRemoves whitespace characters from the end of the string. Value `pattern` can be used to trim a specific pattern from the end (e.g. ".txt") instead of whitespace.
fnIStr trim(IStr str) @safe nothrow @nogcRemoves whitespace characters from both the beginning and end of the string.
fnIStr advanceStr(IStr str, Sz amount) @safe nothrow @nogcAdvances the string by the specified number of characters.
fnFault copyChars(Str str, IStr source, Sz startIndex = 0) @trusted @safe nothrow @nogcCopies characters from the source string to the destination string starting at the specified index.
fnFault copyStr(ref Str str, IStr source, Sz startIndex = 0) @safe nothrow @nogcCopies characters from the source string to the destination string starting at the specified index and adjusts the length of the destination string.
fnIStr concatIntoBuffer(Str buffer, IStr[] args...) @safe nothrow @nogcConcatenates the strings. Writes into the buffer and returns the result.
fnIStr concat(IStr[] args...) @safe nothrow @nogcConcatenates the strings using a static buffer and returns the result.
fnIStr[] split(IStr str, IStr sep) @trusted @safe nothrow @nogcSplits the string using a static buffer and returns the result.
fnIStr[] split(IStr str, char sep) @safe nothrow @nogcSplits the string using a static buffer and returns the result.
fnbool isAbsolutePath(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns true if the given path is absolute.
fnStrPair pathSepStrPair(PathSepStyle style) @safe nothrow @nogcReturns the main and alternate separators for the given style.
fnIStr pathDirName(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns the directory of the path, or "." if there is no directory.
fnIStr pathExtName(IStr path) @safe nothrow @nogcReturns the extension of the path.
fnIStr pathBaseName(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns the base name of the path.
fnIStr pathBaseNameNoExt(IStr path) @safe nothrow @nogcReturns the base name of the path without the extension.
fnIStr pathTrimStart(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcRemoves path separators from the beginning of the path.
fnIStr pathTrimEnd(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcRemoves path separators from the end of the path.
fnIStr pathTrim(IStr path) @safe nothrow @nogcRemoves path separators from the beginning and end of the path.
fnIStr pathFmt(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcFormats the path to a standard form, normalizing separators.
fnIStr pathConcat(IStr[] args...) @safe nothrow @nogcConcatenates the paths, ensuring proper path separators between them.
fnIStr pathConcat(PathSepStyle style, IStr[] args...) @safe nothrow @nogcConcatenates the paths, ensuring proper path separators between them.
fnIStr[] pathSplit(IStr str, PathSepStyle style = PathSepStyle.native) @trusted @safe nothrow @nogcSplits the path using a static buffer and returns the result.
fnIStr skipValue(ref inout(char)[] str, IStr sep, bool canSkipExtra = false) @safe nothrow @nogcSkips over the next occurrence of the specified separator in the string, returning the substring before the separator and updating the input string to start after the separator.
fnIStr skipValue(ref inout(char)[] str, char sep, bool canSkipExtra = false) @safe nothrow @nogcSkips over the next occurrence of the specified separator in the string, returning the substring before the separator and updating the input string to start after the separator.
fnIStr skipLine(ref inout(char)[] str) @safe nothrow @nogcSkips over the next line in the string, returning the substring before the line break and updating the input string to start after the line break.
fnIStr skipSpace(ref inout(char)[] str) @safe nothrow @nogcSkips over the next space in the string, returning the substring before the space and updating the input string to start after the space.
fnByLineRange byLine(IStr view, bool canTrim = false) @safe nothrow @nogcIterates over lines of text.
fnIStr boolToStr(bool value, bool isShortName = false, bool isLower = false) @safe nothrow @nogcConverts the boolean value to its string representation.
fnIStr charToStr(char value) @safe nothrow @nogcConverts the character to its string representation.
fnIStr unsignedToStr(ulong value) @safe nothrow @nogcConverts the unsigned long value to its string representation.
fnIStr signedToStr(long value) @safe nothrow @nogcConverts the signed long value to its string representation.
fnIStr floatingToStr(double value, uint precision = 2) @safe nothrow @nogcConverts the double value to its string representation with the specified precision.
fnIStr strzToStr(IStrz value) @trusted @safe nothrow @nogcConverts the C string to a string.
fnIStr enumToStr(T)(T value) @safe nothrow @nogcConverts the enum value to its string representation.
fnMaybe!bool toBool(IStr str, bool isFullNameOnly = false, bool isUpperOnly = false) @safe nothrow @nogcConverts the string to a bool.
fnMaybe!ulong toUnsigned(IStr str) @safe nothrow @nogcConverts the string to a ulong.
fnMaybe!ulong toUnsigned(char c) @safe nothrow @nogcConverts the character to a ulong.
fnMaybe!long toSigned(IStr str) @safe nothrow @nogcConverts the string to a long.
fnMaybe!long toSigned(char c) @safe nothrow @nogcConverts the character to a long.
fnMaybe!double toFloating(IStr str) @safe nothrow @nogcConverts the string to a double.
fnMaybe!double toFloating(char c) @safe nothrow @nogcConverts the character to a double.
fnMaybe!T toEnum(T, bool noCase = false, bool canIgnoreSpaceAndSymbol = false)(IStr str) if (is(T == enum)) @trusted @safe nothrow @nogcConverts the string to an enum value.
fnMaybe!IStrz toStrz(IStr str) @trusted @safe nothrow @nogcConverts the string to a C string.

Variables 20

enumvarkilobyte = 1024

The size of one kilobyte in bytes.

enumvarmegabyte = 1024 * kilobyte

The size of one megabyte in bytes.

enumvargigabyte = 1024 * megabyte

The size of one gigabyte in bytes.

enumvarterabyte = 1024 * gigabyte

The size of one terabyte in bytes.

enumvarpetabyte = 1024 * terabyte

The size of one petabyte in bytes.

enumvarexabyte = 1024 * petabyte

The size of one exabyte in bytes.

enumvardefaultAsciiFmtArgStr = "{}"

The format argument symbol.

enumvardigitChars = "0123456789"

The set of decimal numeric characters.

enumvarupperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

The set of uppercase letters.

enumvarlowerChars = "abcdefghijklmnopqrstuvwxyz"

The set of lowercase letters.

enumvaralphaChars = upperChars ~ lowerChars

The set of letters.

enumvarspaceChars = " \t\v\r\n\f"

The set of whitespace characters.

enumvarsymbolChars = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"

The set of symbol characters.

enumvarhexDigitChars = "0123456789abcdefABCDEF"

The set of hexadecimal numeric characters.

enumvarsp = Sep(" ")

Space separator.

enumvarcm = Sep(", ")

Comma + space separator.

varchar[defaultAsciiFmtArgBufferSize][defaultAsciiFmtArgBufferCount] _fmtIntoBufferDataBuffer
varIStr[defaultAsciiFmtArgBufferCount] _fmtIntoBufferSliceBuffer
varchar[defaultAsciiFmtBufferSize][defaultAsciiFmtBufferCount] _fmtBuffer
varbyte _fmtBufferIndex = 0

Templates 4

tmplfindInUdaArgs(T, alias member)

Returns the index of an item inside the given UDA arguments or -1 on error.

tmplisInUdaArgs(T, alias member)

Returns true if an item is inside the given UDA arguments.

tmplisInterLitType(TT)
tmplisInterExpType(TT)