10 #ifndef K_API_STRING_H
11 #define K_API_STRING_H
239 #define kString_Chars_(STRING) kxString_Chars_(STRING)
240 #define kString_Length_(STRING) kxString_Length_(STRING)
241 #define kString_SetLength_(STRING, L) kxString_SetLength_(STRING, L)
242 #define kString_Capacity_(STRING) kxString_Capacity_(STRING)
246 #include <kApi/Data/kString.x.h>
kStatus kString_SetLength(kString str, kSize length)
Explicitly sets the length of the string.
kStatus kString_Addvf(kString str, const kChar *format, kVarArgList argList)
Variable-argument version of kString_Addf.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kString_Reserve(kString str, kSize minimumCapacity)
Ensures that capacity is reserved for at least the specified number of character units (excluding nul...
kStatus kString_Construct(kString *str, const kChar *content, kAlloc allocator)
Constructs a kString object.
Represents a single unit (byte) in a UTF-8 character.
kStatus kString_Trim(kString str)
Removes leading and trailing whitespace.
kStatus kString_AddSubstring(kString str, const kChar *content, kSize start, kSize count)
Appends a portion of another string to this string.
kStatus kString_Setvf(kString str, const kChar *format, kVarArgList argList)
Variable-argument version of kString_Setf.
kStatus kString_Assign(kString str, kString source)
Copies the source string content.
kStatus kString_Add(kString str, const kChar *content)
Appends content to the string.
kBool kString_Equals(kString str, const kChar *content)
Compares this string to another character sequence to determine equality.
kSize kString_Length(kString str)
Returns the number of character units in the string buffer (excluding null-terminator).
Essential API declarations.
Represents a 32-bit signed integer.
kChar * kString_Chars(kString str)
Returns a pointer to the internal character buffer.
kStatus kString_Set(kString str, const kChar *content)
Sets the content of the string.
Represents a character string.
kStatus kString_Addf(kString str, const kChar *format,...)
Appends content to the string using a printf-like format string and arguments.
Represents a list implemented with a dynamic array.
Represents an enumeration of error codes.
kStatus kString_Split(kString str, const kChar *delimiters, kArrayList *tokens, kAlloc allocator)
Splits this string into substrings using the supplied delimiters.
kStatus kString_Clear(kString str)
Sets the length of the string to zero.
k32s kString_Compare(kString str, const kChar *content)
Compares this string to another string.
Represents a boolean value.
kStatus kString_Setf(kString str, const kChar *format,...)
Sets the content of the string using a printf-like format string and arguments.
kSize kString_Capacity(kString str)
Returns the number of character units that can be stored without reallocation.