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.
The types module provides basic type definitions, compile-time functions and ASCII string helpers.
The result of sizeof.
The result of pointer math.
A string slice of chars.
A string slice of wchars.
A string slice of dchars.
A string slice of constant chars.
A string slice of constant wchars.
A string slice of constant dchars.
A C string of chars.
A C string of wchars.
A C string of dchars.
A C string of constant chars.
A C string of constant wchars.
A C string of constant dchars.
The common union type for all tagged unions.
The type of a generation.
The type of compile time alias arguments.
Callback that can be used for basic printing. Should works like the echo command in POS*X compliant shells.
A type representing error values.
A type marker for types that support "no data" things. The Rust Result type is a good example of working with types like this.
An attribute for types that support hiding members. Can be used for UI elements, for example.
An attribute for types that support requiring members. Can be used for configurations, for example.
A value paired with its iteration index.
A value paired with its associated key.
K keyV valueA static array. It exists because of a BetterC + struct[N] issue (missing symbol).
ubyte[T.sizeof * N] _data lengthThe length of the array. capacityThe capacity of the array.this(const(T)[] items...)Makes a static array. Passing a slice with a length larger than the array capacity will throw an error.A slice using a foreign memory layout. Useful for interfacing with languages that define slices differently.
A generic static bit set.
T bits zeroTyped zero constant. oneTyped one constant. capacityThe capacity of the bit set.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.The common bit set data type.
The common bit set type.
Represents an optional value with an error code. Errors are referred to as faults in Joka. The default value is an empty value.
void opAssign(in Maybe!T rhs) @trusted @safe nothrow @nogcCopies the state of another optional value.T get(ref Fault trap) @safe nothrow @nogcReturns the value and traps the fault check to avoid an assert.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.Represents an optional value. Prefer using Maybe in most cases.
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.
isPtrTrue if `T` is a pointer.T _dataT get(ref bool trap) @trusted nothrow @nogcReturns the value and traps the `isSome` check to avoid an assert.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.this(in const(T) data)Creates a value.Represents a success or error value. Prefer using Maybe in most cases.
Tag _isSomeResultUnion _dataT get(ref E trap) @trusted nothrow @nogcReturns the value and traps the `isSome` check to avoid an assert.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.A tagged union.
UnionType _typeUnionData _data isBaseAliasingSafeReturns true if all union members share a common first field.@trusted auto call(IStr func, AA...)(AA args)Calls the given method for the currently active type. All types must implement this method.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.typeOf(T)Returns the type of the given type.Path separator style.
Removes the specified prefix from the beginning of the string if it exists.
Removes the specified suffix from the end of the string if it exists.
IStr typeName(U)(in const(U) unionValue) if (is(U : Union!A, A...))Returns the current type name of the union.R[N] castToArray(R, T, Sz N)(ref T[N] from) @trustedCasts each element of a fixed-size array to a new element type.IStr indexErrorMessage(Sz i) @trusted nothrow @nogcReturns an error message that can be used for array-like objects.ForeignSlice!T toForeignSlice(T)(T[] value) @safe nothrow @nogcReturns an foreign slice from a D slice.ForeignSlice!(const(ubyte)) toForeignBytes(const(char)[] value) @safe nothrow @nogc @trustedReturns an foreign slice from a D slice.ForeignSlice!(ubyte) toForeignBytesMut(char[] value) @safe nothrow @nogc @trustedReturns an foreign slice from a D slice.float basicFloor(float x) @safe nothrow @nogcReturns the floor of `x` using a basic cast-based implementation.double basicFloor64(double x) @safe nothrow @nogcReturns the floor of `x` using a basic cast-based implementation.float basicRound(float x) @safe nothrow @nogcReturns the nearest integer to `x` using a basic cast-based implementation.double basicRound64(double x) @safe nothrow @nogcReturns the nearest integer to `x` using a basic cast-based implementation.float basicCeil(float x) @safe nothrow @nogcReturns the ceiling of `x` using a basic cast-based implementation.double basicCeil64(double x) @safe nothrow @nogcReturns the ceiling of `x` using a basic cast-based implementation.int findInAliasArgs(T, A...)() @__ctfeReturns the index of an item inside the given alias arguments or -1 on error.IStr 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....IStr 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....IStr fmtIntoBuffer(A...)(Str buffer, InterpolationHeader header, A args, InterpolationFooter footer) @safeIStr 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.IStr 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, ...IStr 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, ...noreturn 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.uint hashFnv32a(IStr text) @safe nothrow @nogcHashes a string using the FNV-1a algorithm with a 32-bit output.ulong hashFnv64a(IStr text) @safe nothrow @nogcHashes a string using the FNV-1a algorithm with a 64-bit output.Floating flo(double value, uint precision) @safe nothrow @nogcWraps a floating value with formatting options.bool isUpper(char c) @safe nothrow @nogcReturns true if the character is an uppercase letter (A-Z).bool isAlpha(char c) @safe nothrow @nogcReturns true if the character is an alphabetic letter (A-Z, a-z).bool isAlphaOrDigit(char c) @safe nothrow @nogcReturns true if the character is an alphabetic letter (A-Z, a-z) or a digit (0-9).bool isSpace(char c) @safe nothrow @nogcReturns true if the character is a whitespace character (space, tab, ...).bool isHexDigit(char c) @safe nothrow @nogcReturns true if the character is a hexadecimal digit (0-9, A-F, a-f).bool isAutocompleteSep(char c) @safe nothrow @nogcReturns true if the character is a autocomplete separator.bool isVariableNameStart(char c) @safe nothrow @nogcReturns true if the character can start a variable name (letter or underscore).bool isVariableNamePart(char c) @safe nothrow @nogcReturns true if the character can appear in a variable name (letter, digit, or underscore).bool 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).char toUpper(char c) @safe nothrow @nogcConverts the character to uppercase if it is a lowercase letter.char toLower(char c) @safe nothrow @nogcConverts the character to lowercase if it is an uppercase letter.Str toUpper(Str str) @safe nothrow @nogcConverts all lowercase letters in the string to uppercase.Str toLower(Str str) @safe nothrow @nogcConverts all uppercase letters in the string to lowercase.bool equalsNoCase(IStr str, IStr other) @safe nothrow @nogcReturns true if the two strings are equal, ignoring case.bool startsWith(IStr str, IStr start) @safe nothrow @nogcReturns true if the string starts with the specified substring.bool startsWith(IStr str, char start) @safe nothrow @nogcReturns true if the string starts with the specified character.bool endsWith(IStr str, IStr end) @safe nothrow @nogcReturns true if the string ends with the specified substring.bool endsWith(IStr str, char end) @safe nothrow @nogcReturns true if the string ends with the specified character.int countItem(IStr str, IStr item) @safe nothrow @nogcCounts the number of occurrences of the specified substring in the string.int countItem(IStr str, char item) @safe nothrow @nogcCounts the number of occurrences of the specified character in the string.int 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.int 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.int 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.int 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.int findItem(IStr[] items, IStr item) @safe nothrow @nogcFinds the first occurrence of the specified item in the slice, or returns -1 if not found.int findItem(IStr[] items, char item) @safe nothrow @nogcFinds the first occurrence of the specified item in the slice, or returns -1 if not found.int findItemThatStartsWith(IStr[] items, IStr start) @safe nothrow @nogcFinds the first occurrence of the specified start in the slice, or returns -1 if not found.int findItemThatStartsWith(IStr[] items, char start) @safe nothrow @nogcFinds the first occurrence of the specified start in the slice, or returns -1 if not found.int findItemThatEndsWith(IStr[] items, IStr end) @safe nothrow @nogcFinds the first occurrence of the specified end in the slice, or returns -1 if not found.int findItemThatEndsWith(IStr[] items, char end) @safe nothrow @nogcFinds the first occurrence of the specified end in the slice, or returns -1 if not found.IStr 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.IStr 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.IStr 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.IStr 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.IStr trim(IStr str) @safe nothrow @nogcRemoves whitespace characters from both the beginning and end of the string.IStr advanceStr(IStr str, Sz amount) @safe nothrow @nogcAdvances the string by the specified number of characters.Fault 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.Fault 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.IStr concatIntoBuffer(Str buffer, IStr[] args...) @safe nothrow @nogcConcatenates the strings. Writes into the buffer and returns the result.IStr concat(IStr[] args...) @safe nothrow @nogcConcatenates the strings using a static buffer and returns the result.IStr[] split(IStr str, IStr sep) @trusted @safe nothrow @nogcSplits the string using a static buffer and returns the result.IStr[] split(IStr str, char sep) @safe nothrow @nogcSplits the string using a static buffer and returns the result.bool isAbsolutePath(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns true if the given path is absolute.StrPair pathSepStrPair(PathSepStyle style) @safe nothrow @nogcReturns the main and alternate separators for the given style.IStr pathDirName(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns the directory of the path, or "." if there is no directory.IStr pathBaseName(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcReturns the base name of the path.IStr pathBaseNameNoExt(IStr path) @safe nothrow @nogcReturns the base name of the path without the extension.IStr pathTrimStart(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcRemoves path separators from the beginning of the path.IStr pathTrimEnd(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcRemoves path separators from the end of the path.IStr pathTrim(IStr path) @safe nothrow @nogcRemoves path separators from the beginning and end of the path.IStr pathFmt(IStr path, PathSepStyle style = PathSepStyle.native) @safe nothrow @nogcFormats the path to a standard form, normalizing separators.IStr pathConcat(IStr[] args...) @safe nothrow @nogcConcatenates the paths, ensuring proper path separators between them.IStr pathConcat(PathSepStyle style, IStr[] args...) @safe nothrow @nogcConcatenates the paths, ensuring proper path separators between them.IStr[] pathSplit(IStr str, PathSepStyle style = PathSepStyle.native) @trusted @safe nothrow @nogcSplits the path using a static buffer and returns the result.IStr 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.IStr 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.IStr 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.IStr 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.ByLineRange byLine(IStr view, bool canTrim = false) @safe nothrow @nogcIterates over lines of text.IStr boolToStr(bool value, bool isShortName = false, bool isLower = false) @safe nothrow @nogcConverts the boolean value to its string representation.IStr charToStr(char value) @safe nothrow @nogcConverts the character to its string representation.IStr unsignedToStr(ulong value) @safe nothrow @nogcConverts the unsigned long value to its string representation.IStr signedToStr(long value) @safe nothrow @nogcConverts the signed long value to its string representation.IStr floatingToStr(double value, uint precision = 2) @safe nothrow @nogcConverts the double value to its string representation with the specified precision.IStr enumToStr(T)(T value) @safe nothrow @nogcConverts the enum value to its string representation.Maybe!bool toBool(IStr str, bool isFullNameOnly = false, bool isUpperOnly = false) @safe nothrow @nogcConverts the string to a bool.kilobyte = 1024The size of one kilobyte in bytes.
megabyte = 1024 * kilobyteThe size of one megabyte in bytes.
gigabyte = 1024 * megabyteThe size of one gigabyte in bytes.
terabyte = 1024 * gigabyteThe size of one terabyte in bytes.
petabyte = 1024 * terabyteThe size of one petabyte in bytes.
exabyte = 1024 * petabyteThe size of one exabyte in bytes.
defaultAsciiFmtArgStr = "{}"The format argument symbol.
digitChars = "0123456789"The set of decimal numeric characters.
upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"The set of uppercase letters.
lowerChars = "abcdefghijklmnopqrstuvwxyz"The set of lowercase letters.
alphaChars = upperChars ~ lowerCharsThe set of letters.
spaceChars = " \t\v\r\n\f"The set of whitespace characters.
symbolChars = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"The set of symbol characters.
hexDigitChars = "0123456789abcdefABCDEF"The set of hexadecimal numeric characters.
sp = Sep(" ")Space separator.
cm = Sep(", ")Comma + space separator.
char[defaultAsciiFmtArgBufferSize][defaultAsciiFmtArgBufferCount] _fmtIntoBufferDataBufferIStr[defaultAsciiFmtArgBufferCount] _fmtIntoBufferSliceBufferchar[defaultAsciiFmtBufferSize][defaultAsciiFmtBufferCount] _fmtBufferbyte _fmtBufferIndex = 0Returns the index of an item inside the given UDA arguments or -1 on error.
Returns true if an item is inside the given UDA arguments.