Structs§
- NSTD
String - Represents a dynamic-sized array of UTF-8 chars.
Functions§
- nstd_
str_ ⚠compare - Compares two strings.
Parameters:
const char *const str1- The first string to compare.const char *const str2- The second string to compare. Returns:int e- Nonzero if the two strings are lexicographically equal. - nstd_
str_ ⚠concat - Concatenates two strings.
Parameters:
const char *const str1- The first string.const char *const str2- The second string. Returns:char *str- The new string, null on error. - nstd_
str_ ⚠contains - nstd_
str_ ⚠contains_ char - nstd_
str_ ⚠ends_ with - nstd_
str_ ⚠ends_ with_ char - nstd_
str_ ⚠find - nstd_
str_ ⚠find_ char - nstd_
str_ ⚠find_ last - nstd_
str_ ⚠find_ last_ char - nstd_
str_ ⚠free_ concat - Frees memory allocated by
nstd_str_concat. Parameters:const char **str- The string. - nstd_
str_ ⚠len - Calculates a string’s length.
Parameters:
const char *const str- The string. Returns:NSTDUSize len- The length of the string. - nstd_
str_ ⚠starts_ with - nstd_
str_ ⚠starts_ with_ char - nstd_
str_ ⚠string_ as_ slice - Creates an
NSTDSlicefrom anNSTDString. Parameters:const NSTDString *const string- The string. Returns:NSTDSlice slice- The new slice. - nstd_
str_ ⚠string_ as_ str - Creates a string view from an
NSTDString. Parameters:const NSTDString *const string- The string. Returns:NSTDStr str- The new string view. - nstd_
str_ ⚠string_ byte_ len - Returns the number of bytes used by this string.
Parameters:
const NSTDString *const string- The string. Returns:NSTDUSize len- The number of bytes in the string. - nstd_
str_ ⚠string_ extend - Extends an
NSTDStringby anNSTDSliceofNSTDUnichars. Parameters:NSTDString *const string- The string.const NSTDSlice chars-NSTDSliceofNSTDUnichars. - nstd_
str_ ⚠string_ free - Frees an
NSTDStringinstance. Parameters:NSTDString *const string- Pointer to a string. Returns:int errc- Nonzero on error. - nstd_
str_ ⚠string_ from_ cstring - Creates a new
NSTDStringfrom a raw C string. Parameters:const char *const cstr- The C string. Returns:NSTDString string- The new NSTD string. - nstd_
str_ ⚠string_ from_ double - nstd_
str_ ⚠string_ from_ float - nstd_
str_ ⚠string_ from_ int - nstd_
str_ ⚠string_ from_ isize - nstd_
str_ ⚠string_ from_ long - nstd_
str_ ⚠string_ from_ longlong - nstd_
str_ ⚠string_ from_ schar - nstd_
str_ ⚠string_ from_ short - nstd_
str_ ⚠string_ from_ uchar - nstd_
str_ ⚠string_ from_ uint - nstd_
str_ ⚠string_ from_ ulong - nstd_
str_ ⚠string_ from_ ulonglong - nstd_
str_ ⚠string_ from_ ushort - nstd_
str_ ⚠string_ from_ usize - nstd_
str_ ⚠string_ len - Gets the length of a string.
Parameters:
const NSTDString *const string- The string. Returns:NSTDUSize len- The length of the UTF-8 encoded string, -1 on error. - nstd_
str_ ⚠string_ new - Creates a new
NSTDStringinstance. Returns:NSTDString string- The new string. - nstd_
str_ ⚠string_ pop - Removes an
NSTDUnicharfrom the end of anNSTDString. Parameters:NSTDString *const string- The string. Returns:NSTDUnichar chr- The unichar that was popped off the string, fill char on error. - nstd_
str_ ⚠string_ push - Pushes an
NSTDUnicharto anNSTDString. Parameters:NSTDString *const string- The string.const NSTDUnichar chr- The unicode character to push to the string. Returns:int errc- Nonzero on error. - nstd_
str_ ⚠to_ double - nstd_
str_ ⚠to_ float - nstd_
str_ ⚠to_ int - nstd_
str_ ⚠to_ long - nstd_
str_ ⚠to_ longlong - nstd_
str_ ⚠to_ schar - nstd_
str_ ⚠to_ short - nstd_
str_ ⚠to_ uchar - nstd_
str_ ⚠to_ uint - nstd_
str_ ⚠to_ ulong - nstd_
str_ ⚠to_ ulonglong - nstd_
str_ ⚠to_ ushort