10 #ifndef K_API_STRING_H
11 #define K_API_STRING_H
14 #include <kApi/Data/kString.x.h>
282 return obj->capacity;
kStatus kString_Set(kString str, const kChar *content)
Sets the content of the string.
kStatus kString_Add(kString str, const kChar *content)
Appends content to the string.
kStatus kString_Setf(kString str, const kChar *format,...)
Sets the content of the string using a printf-like format string and arguments.
kBool kString_Equals(kString str, const kChar *content)
Compares this string to another character sequence to determine equality.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kString_Clear(kString str)
Sets the length of the string to zero.
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kStatus kString_Addvf(kString str, const kChar *format, kVarArgList argList)
Variable-argument version of kString_Addf.
Represents a single unit (byte) in a UTF-8 character.
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_Setvf(kString str, const kChar *format, kVarArgList argList)
Variable-argument version of kString_Setf.
#define kObj(TypeName_T, T_object)
Declares a local "obj" (this-pointer) variable and initializes it from a type-checked object handle...
Definition: kApiDef.h:2921
kStatus kString_Addf(kString str, const kChar *format,...)
Appends content to the string using a printf-like format string and arguments.
kChar * kString_Chars(kString str)
Returns a pointer to the internal character buffer.
Definition: kString.h:247
Core Zen type declarations.
Represents a 32-bit signed integer.
kStatus kString_Split(kString str, const kChar *delimiters, kArrayList *tokens, kAlloc allocator)
Splits this string into substrings using the supplied delimiters.
Definition: kString.h:220
kSize kString_Capacity(kString str)
Returns the number of character units that can be stored without reallocation.
Definition: kString.h:278
Represents a character string.
kStatus kString_Construct(kString *str, const kChar *content, kAlloc allocator)
Constructs a kString object.
Represents a list implemented with a dynamic array.
Represents an error code.
k32s kString_Compare(kString str, const kChar *content)
Compares this string to another string.
kStatus kString_Assign(kString str, kString source)
Copies the source string content.
kStatus kString_AddSubstring(kString str, const kChar *content, kSize start, kSize count)
Appends a portion of another string to this string.
Represents a boolean value.
#define kFALSE
Boolean false.
Definition: kApiDef.h:353
kStatus kString_SetLength(kString str, kSize length)
Explicitly sets the length of the string.
kSize kString_Length(kString str)
Returns the number of character units in the string buffer (excluding null-terminator).
Definition: kString.h:264
kStatus kString_Trim(kString str)
Removes leading and trailing whitespace.
kStatus kString_SplitEx(kString str, const kChar *delimiters, kArrayList *tokens, kBool discardEmpty, kAlloc allocator)
Splits this string into substrings using the supplied delimiters.