string(*char)
create :: string(c : exact *char)
Creates a string from a null-terminated character array
Arguments
Returns:
A new string containing the characters from the array
string(int64)
cast :: string(n : int64)
Converts an integer to its decimal string representation
Arguments
Returns:
A new string containing the decimal representation of n
string(char)
cast :: string(c : exact char)
Converts a char to a single-character string
string(uint8)
cast :: string(n : exact uint8)
Converts an uint8 to its decimal string representation
Arguments
Returns:
A new string containing the decimal representation of n
string(double)
cast :: string(x : double)
Converts a double to its string representation using %g format
string(float)
cast :: string(x : float)
Converts a float to its string representation
print(string)
print :: (s : exact string)
A function to overload print(*char) for strings
printl(string)
printl :: (s : exact string)
A function to overload printl(*char) for strings
padRight(s, ch, targetLen)
padRight :: string(s : exact string, ch : exact char, targetLen : int)
Returns s with ch appended on the right until length reaches targetLen. If s is already at or beyond targetLen, returns s unchanged.
padLeft(s, ch, targetLen)
padLeft :: string(s : exact string, ch : exact char, targetLen : int)
Returns s with ch prepended on the left until length reaches targetLen. If s is already at or beyond targetLen, returns s unchanged.
basename(s)
basename :: string(s : exact string)
Returns the filename portion of a path (everything after the last '/'). If no '/' is found, returns s unchanged.
find(s, sub)
find :: int64(s : exact string, sub : exact string)
Returns the index of the first occurrence of sub in s, or -1 if not found