Evo C++ Library v0.5.1
|
#include <evo/string.h>
String container.
std::string
C++11:
Output:
Classes | |
struct | Format |
String formatter with state. More... | |
Public Types | |
typedef void | EvoContainerType |
typedef char | Item |
Item type (same as Value) More... | |
typedef DataCopy< char >::PassType | ItemVal |
Item type as parameter (POD types passed by value, otherwise by const-ref) More... | |
typedef IteratorRa< ThisType >::Const | Iter |
Iterator (const) - IteratorRa. More... | |
typedef IteratorRa< ThisType > | IterM |
Iterator (mutable) - IteratorRa. More... | |
typedef Size | Key |
Key type (item index) More... | |
typedef ListBase< char, Size > | ListBaseType |
List base type for any Evo list More... | |
typedef List< char, StrSizeT > | ListType |
List type. More... | |
typedef String | Out |
Type returned by write_out() More... | |
typedef StrSizeT | Size |
List size integer type More... | |
typedef ListBaseType | StringBase |
Alias for ListBaseType. More... | |
typedef String | ThisType |
This string type. More... | |
typedef ListBase< wchar16, Size > | UnicodeStringBase |
Base for UnicodeString. More... | |
typedef char | Value |
Value type (same as Item) More... | |
Public Member Functions | |
String () | |
Default constructor sets as null. More... | |
String (const String &str) | |
Copy constructor. More... | |
String (const ListType &str) | |
Copy constructor. More... | |
String (const ListType *str) | |
Copy constructor. More... | |
String (const ListType &str, Key index, Key size=ALL) | |
Extended copy constructor. More... | |
String (const StringBase &str, Key index=0, Key size=ALL) | |
Constructor to copy substring data. More... | |
String (const char *str, Size size) | |
Constructor for string pointer. More... | |
String (const PtrBase< char > &str, Size size) | |
Constructor for managed string pointer. More... | |
String (const UnicodeStringBase &str) | |
Constructor to convert from UTF-16 string to UTF-8 string. More... | |
String (const char *str) | |
Constructor for null terminated string. More... | |
String (const PtrBase< char > &str) | |
Constructor to copy null terminated string from managed pointer. More... | |
String (const char16_t *str, Size size, UtfMode mode=umREPLACE_INVALID) | |
Constructor to initialize and convert from UTF-16 string literal (using u prefix). More... | |
String (const char16_t *str, UtfMode mode=umREPLACE_INVALID) | |
Constructor to initialize and convert from terminated UTF-16 string literal (using u prefix). More... | |
String (const std::initializer_list< char > &init) | |
Sequence constructor (C++11). More... | |
String (String &&src) | |
Move constructor (C++11). More... | |
ListType & | add (const Item *data, Size size) |
Append new items copied from data pointer (modifier). More... | |
String & | add (char ch) |
Append character (modifier). More... | |
String & | add (char ch, Size count) |
Append copies of the same character (modifier). More... | |
String & | add (const ListType &str) |
Append from another string (modifier). More... | |
String & | add (const StringBase &str) |
Append from another string (modifier). More... | |
String & | add (const char *str, Size size) |
Append from string pointer (modifier). More... | |
String & | add (const char *str) |
Append null terminated string (modifier). More... | |
ListType & | addmin (Size minsize) |
Append new items up to a given minimum size (modifier). More... | |
String & | addn (int num, int base=fDEC) |
Append formatted signed number (modifier). More... | |
String & | addn (long num, int base=fDEC) |
Append formatted signed number (modifier). More... | |
String & | addn (longl num, int base=fDEC) |
Append formatted signed number (modifier). More... | |
String & | addn (uint num, int base=fDEC) |
Append formatted unsigned number (modifier). More... | |
String & | addn (ulong num, int base=fDEC) |
Append formatted unsigned number (modifier). More... | |
String & | addn (ulongl num, int base=fDEC) |
Append formatted unsigned number (modifier). More... | |
String & | addn (float num, int precision=fPREC_AUTO) |
Append formatted floating point number (modifier). More... | |
String & | addn (double num, int precision=fPREC_AUTO) |
Append formatted floating point number (modifier). More... | |
String & | addn (ldouble num, int precision=fPREC_AUTO) |
Append formatted floating point number (modifier). More... | |
ListType & | addnew (Size size=1) |
Append new items (modifier). More... | |
String & | addsep (char delim=',') |
Append separator/delimiter if needed (modifier). More... | |
void | advAdd (Size size) |
Advanced: Append new items without initializing (constructing) them. More... | |
char * | advBuffer (Size size) |
Advanced: Resize and get buffer pointer (modifier). More... | |
char * | advBuffer () |
Advanced: Get buffer pointer (modifier). More... | |
bool | advEdit (Edit &edit, Size minsize, bool inplace=true) |
Advanced: Start optimized in-place/buffer edit. More... | |
void | advEditDone (Edit &edit) |
Advanced: Finish edit started with advEdit() (modifier). More... | |
char * | advFirst () |
Advanced: Get first item (modifier). More... | |
Key | advInsert (Key index, Size size) |
Advanced: Insert new items without initializing (constructing) them. More... | |
char & | advItem (Key index) |
Advanced: Get item (mutable). More... | |
char * | advLast () |
Advanced: Get last item (modifier). More... | |
void | advPrepend (Size size) |
Advanced: Prepend new items without initializing (constructing) them. More... | |
void | advRemove (Key index, Size size) |
Advanced: Remove given items without uninitializing (destructing) them. More... | |
ListType & | advResize (Size size) |
Advanced: Resize while preserving existing data, POD items not initialized (modifier). More... | |
String & | advResize (Size size) |
Advanced: Resize while preserving existing data, POD items not initialized (modifier). More... | |
void | advSize (Size size) |
Advanced: Set new size after writing directly to buffer. More... | |
void | advSwap (Key index1, Key index2) |
Advanced: Swap given items. More... | |
char * | advWrite (Size addsize) |
Advanced: Get buffer pointer to write/append (modifier). More... | |
void | advWriteDone (Size addsize) |
Advanced: Update size added after writing directly to buffer. More... | |
const String & | asconst () const |
Explicitly use a const reference to this. More... | |
IterM | begin () |
Get iterator at first item (mutable). More... | |
Iter | begin () const |
Get iterator at first item (const). More... | |
Bool | boolval () const |
Convert to bool value. More... | |
ListType & | capacity (Size size) |
Set new capacity (modifier). More... | |
Size | capacity () const |
Get capacity. More... | |
String & | capacity (Size size) |
Set new capacity (modifier). More... | |
ListType & | capacitymax (Size max) |
Set maximum capacity (modifier). More... | |
String & | capacitymax (Size max) |
Set maximum capacity (modifier). More... | |
ListType & | capacitymin (Size min) |
Set minimum capacity (modifier). More... | |
String & | capacitymin (Size min) |
Set minimum capacity (modifier). More... | |
Iter | cbegin () const |
Get iterator at first item (const). More... | |
Iter | cend () const |
Get iterator at end (const). More... | |
String & | clear () |
Clear by removing all items. More... | |
String & | compact () |
Reduce capacity to fit current size (modifier). More... | |
int | compare (const ListBaseType &data) const |
Comparison. More... | |
template<class T > | |
int | compare (const ListBase< wchar16, T > &str) |
Comparison against UTF-16 string. More... | |
bool | contains (const Item *data, Size size) const |
Check if contains given data. More... | |
bool | contains (char ch) const |
Check whether this contains given character. More... | |
bool | contains (const char *str, Size size) const |
Check whether this contains given string. More... | |
bool | contains (const StringBase &str) const |
Check whether contains given string. More... | |
template<class C > | |
C | convert () const |
Convert string to value of given type. More... | |
template<class C > | |
String & | convert_add (C value) |
Convert value to string, appending to current string. More... | |
template<class C > | |
bool | convert_addq (C value, char delim=',') |
Convert value to string with quoting as needed, appending to current string. More... | |
template<class C > | |
String & | convert_set (C value) |
Convert value to string, replacing current string. More... | |
ListType & | copy (const Item *data, Size size) |
Set as full (unshared) copy using data pointer (modifier). More... | |
String & | copy (const ListType &str) |
Set as full (unshared) copy of another string (modifier). More... | |
String & | copy (const StringBase &str) |
Set as full (unshared) copy of substring (modifier). More... | |
String & | copy (const char *str, Size size) |
Set as full (unshared) copy using string pointer (modifier). More... | |
String & | copy (const char *str) |
Set as full (unshared) copy of null terminated string (modifier). More... | |
const char * | cstr (String &buffer) const |
Get terminated string pointer, using given string buffer if needed (const). More... | |
const char * | cstr () |
Get terminated string pointer (modifier). More... | |
const char * | cstrM () const |
Get terminated string pointer (modifier). More... | |
const char * | data () const |
Get string pointer (const). More... | |
char * | dataM () |
Get data pointer (mutable). More... | |
bool | empty () const |
Get whether empty. More... | |
IterM | end () |
Get iterator at end. More... | |
Iter | end () const |
Get iterator at end. More... | |
bool | ends (const Item *items, Size size) const |
Check if this ends with given items. More... | |
bool | ends (const ListBaseType &items) const |
Check if this ends with given items. More... | |
bool | ends (char ch) const |
Check if this ends with given character. More... | |
ListType & | fill (const Item &item, Key index=0, Size size=ALL) |
Fill using item (modifier). More... | |
String & | fillch (char ch, Key index=0, Size size=ALL) |
Fill with copies of character (modifier). More... | |
Key | find (ItemVal item, Key start=0, Key end=END) const |
Find first occurrence of item with forward search. More... | |
Key | find (char ch) const |
Find first occurrence of character with forward search. More... | |
Key | find (char ch, Key start, Key end=END) const |
Find first occurrence of character with forward search. More... | |
Key | find (const char *pattern, uint pattern_size, Key start=0, Key end=END) const |
Find first occurrence of pattern string. More... | |
Key | find (StringSearchAlg alg, const char *pattern, uint pattern_size, Key start=0, Key end=END) const |
Find first occurrence of pattern string using specified algorithm. More... | |
Key | find (const StringBase &pattern, Key start=0, Key end=END) const |
Find first occurrence of pattern string. More... | |
Key | find (StringSearchAlg alg, const StringBase &pattern, Key start=0, Key end=END) const |
Find first occurrence of pattern string using specified algorithm. More... | |
Key | findany (const Item *items, Size count, Key start=0, Key end=END) const |
Find first occurrence of any given items with forward search. More... | |
Key | findany (const char *chars, Size count, Key start=0, Key end=END) const |
Find first occurrence of any given characters with forward search. More... | |
Key | findany (const StringBase &chars, Key start=0, Key end=END) const |
Find first occurrence of any given characters with forward search. More... | |
Key | findanybut (const char *chars, Size count, Key start=0, Key end=END) const |
Find first occurrence of any character not listed with forward search. More... | |
Key | findanybut (const StringBase &chars, Key start=0, Key end=END) const |
Find first occurrence of any character not listed with forward search. More... | |
Key | findanybutr (const char *chars, Size count, Key start=0, Key end=END) const |
Find last occurrence of any character not listed with reverse search. More... | |
Key | findanybutr (const StringBase &chars, Key start=0, Key end=END) const |
Find last occurrence of any character not listed with reverse search. More... | |
Key | findanyr (const Item *items, Size count, Key start=0, Key end=END) const |
Find last occurrence of any given items with reverse search. More... | |
Key | findanyr (const char *chars, Size count, Key start=0, Key end=END) const |
Find last occurrence of any given characters with reverse search. More... | |
Key | findanyr (const StringBase &chars, Key start=0, Key end=END) const |
Find last occurrence of any given characters with reverse search. More... | |
Key | findnonword (Key start=0, Key end=END) const |
Find first non-word word character. More... | |
Key | findnonwordr (Key start=0, Key end=END) const |
Find last non-word character with reverse search. More... | |
Key | findr (ItemVal item, Key start=0, Key end=END) const |
Find last occurrence of item with reverse search. More... | |
Key | findr (char ch) const |
Find last occurrence of character with reverse search. More... | |
Key | findr (char ch, Key start, Key end=END) const |
Find last occurrence of character with reverse search. More... | |
Key | findr (const char *pattern, uint pattern_size, Key start=0, Key end=END) const |
Find last occurrence of pattern string with reverse search. More... | |
Key | findr (StringSearchAlg alg, const char *pattern, uint pattern_size, Key start=0, Key end=END) const |
Find last occurrence of pattern string with reverse search. More... | |
Key | findr (const StringBase &pattern, Key start=0, Key end=END) const |
Find last occurrence of pattern string with reverse search. More... | |
Key | findr (StringSearchAlg alg, const StringBase &pattern, Key start=0, Key end=END) const |
Find last occurrence of pattern string with reverse search. More... | |
Size | findreplace (char ch, const char *str, Size size, Size max=ALL) |
Find character and replace with string (modifier). More... | |
Size | findreplace (char ch, const StringBase &str, Size max=ALL) |
Find character and replace with string (modifier). More... | |
Size | findreplace (const char *fstr, Size fsize, const char *str, Size size, Size max=ALL) |
Find string and replace with string (modifier). More... | |
Size | findreplace (const char *fstr, Size fsize, const StringBase &str, Size max=ALL) |
Find string and replace with string (modifier). More... | |
Size | findreplace (const StringBase &fstr, const StringBase &str, Size max=ALL) |
Find string and replace with string (modifier). More... | |
Size | findreplace (const StringBase &fstr, const char *str, Size size, Size max=ALL) |
Find string and replace with string (modifier). More... | |
Key | findword (Key start=0, Key end=END) const |
Find first word character. More... | |
Key | findwordr (Key start=0, Key end=END) const |
Find last word character with reverse search. More... | |
const Item * | first () const |
Get first item (const). More... | |
Item * | firstM () |
Get first item (mutable). More... | |
bool | getbool (Error &error) const |
Convert to bool value for given boolean type. More... | |
template<class T > | |
T | getbool () const |
Convert to bool value for given boolean type. More... | |
template<class T > | |
T | getnum (Error &error, int base=0) const |
Convert to number value for given integer type. More... | |
template<class T > | |
T | getnum (int base=0) const |
Convert to number value for given integer type. More... | |
template<class T > | |
T | getnumf (Error &error) const |
Convert to floating point number value for given type. More... | |
template<class T > | |
T | getnumf () const |
Convert to floating point number value for given type. More... | |
ulong | hash (ulong seed=0) const |
Get data hash value. More... | |
Key | iend (Size offset=0) const |
Get index from last item using offset. More... | |
Size | insert (Key index, const Item *data, Size size) |
Insert new items copied from data pointer (modifier). More... | |
Size | insert (Key index, const ListBaseType &data) |
Insert new items copied from another list (modifier). More... | |
Size | insert (Key index, const Item &data) |
Insert new item (modifier). More... | |
Size | insert (Key index, char ch) |
Insert character (modifier). More... | |
Size | insert (Key index, char ch, Size count) |
Insert copies of the same character (modifier). More... | |
Size | insert (Key index, const ListType &str) |
Insert from another string (modifier). More... | |
Size | insert (Key index, const StringBase &str) |
Insert from another string (modifier). More... | |
Size | insert (Key index, const char *str, Size size) |
Insert string data (modifier). More... | |
String & | insert (Key index, const char *str) |
Insert null terminated string (modifier). More... | |
String & | insertn (Key index, int num, int base=fDEC) |
Insert formatted signed number (modifier). More... | |
String & | insertn (Key index, long num, int base=fDEC) |
Insert formatted signed number (modifier). More... | |
String & | insertn (Key index, longl num, int base=fDEC) |
Insert formatted signed number (modifier). More... | |
String & | insertn (Key index, uint num, int base=fDEC) |
Insert formatted unsigned number (modifier). More... | |
String & | insertn (Key index, ulong num, int base=fDEC) |
Insert formatted unsigned number (modifier). More... | |
String & | insertn (Key index, ulongl num, int base=fDEC) |
Insert formatted unsigned number (modifier). More... | |
String & | insertn (Key index, float num, int precision=fPREC_AUTO) |
Insert formatted floating point number (modifier). More... | |
String & | insertn (Key index, double num, int precision=fPREC_AUTO) |
Insert formatted floating point number (modifier). More... | |
String & | insertn (Key index, ldouble num, int precision=fPREC_AUTO) |
Insert formatted floating point number (modifier). More... | |
Size | insertnew (Key index, Size size=1) |
Insert new items (modifier). More... | |
const Item & | item (Key index) const |
Get item at position (const). More... | |
char & | itemM (Key index) |
Get item at position (mutable). More... | |
template<class C > | |
String & | join (const C &items, char delim=',') |
Join list items into delimited string. More... | |
template<class C > | |
String & | joinmap (const C &map, char delim=',', char kvdelim='=') |
Join map items into delimited string. More... | |
template<class C > | |
String & | joinmapq (const C &map, char delim=',', char kvdelim='=') |
Join map items into delimited string, with quoting as needed. More... | |
template<class C > | |
String & | joinq (const C &items, char delim=',') |
Join list items into delimited string, with quoting as needed. More... | |
const Item * | last () const |
Get last item (const). More... | |
Item * | lastM () |
Get last item (mutable). More... | |
void | move (Key dest, Key index) |
Move item to position (modifier). More... | |
Size | move (Key dest, ListType &src, Key srcindex=0, Size size=ALL) |
Move items from another list. More... | |
bool | null () const |
Get whether null. More... | |
Int | num (int base=0) const |
Convert to number value (signed). More... | |
Float | numf () const |
Convert to number value (floating point). More... | |
FloatD | numfd () const |
Convert to number value (double floating point). More... | |
FloatL | numfl () const |
Convert to number value (ldouble floating point). More... | |
Long | numl (int base=0) const |
Convert to number value (signed long). More... | |
LongL | numll (int base=0) const |
Convert to number value (signed long-long). More... | |
UInt | numu (int base=0) const |
Convert to number value (unsigned). More... | |
ULong | numul (int base=0) const |
Convert to number value (unsigned long). More... | |
ULongL | numull (int base=0) const |
Convert to number value (unsigned long-long). More... | |
bool | operator!= (const ListBaseType &data) const |
Inequality operator. More... | |
bool | operator!= (const String &str) const |
Inequality operator. More... | |
bool | operator!= (const char *str) const |
Inequality operator. More... | |
template<class T > | |
bool | operator!= (const ListBase< wchar16, T > &str) |
Inequality operator to compare against UTF-16 string. More... | |
char & | operator() (Key index) |
Get item at position (mutable). More... | |
String & | operator<< (bool val) |
Append operator. More... | |
String & | operator<< (char ch) |
Append operator. More... | |
String & | operator<< (const ListType &str) |
Append operator. More... | |
String & | operator<< (const StringBase &str) |
Append operator. More... | |
String & | operator<< (const char *str) |
Append operator. More... | |
String & | operator<< (const ValNull &val) |
Append operator to set as null and empty. More... | |
String & | operator<< (const ValEmpty &val) |
Append operator to set as empty but not null. More... | |
String & | operator<< (Newline nl) |
Append operator to append newline. More... | |
String & | operator<< (Flush) |
Flush output buffer – no-op for string. More... | |
String & | operator<< (int num) |
Append operator to append formatted number. More... | |
String & | operator<< (long num) |
Append operator to append formatted number. More... | |
String & | operator<< (longl num) |
Append operator to append formatted number. More... | |
String & | operator<< (uint num) |
Append operator to append formatted number. More... | |
String & | operator<< (ulong num) |
Append operator to append formatted number. More... | |
String & | operator<< (ulongl num) |
Append operator to append formatted number. More... | |
String & | operator<< (float num) |
Append operator to append formatted number. More... | |
String & | operator<< (double num) |
Append operator to append formatted number. More... | |
String & | operator<< (ldouble num) |
Append operator to append formatted number. More... | |
String & | operator<< (const FmtChar &fmt) |
Append operator to append formatted character field. More... | |
String & | operator<< (const FmtString &fmt) |
Append operator to append formatted string field. More... | |
String & | operator<< (const FmtStringWrap &fmt) |
Append operator to append formatted wrapped string column. More... | |
String & | operator<< (const FmtShort &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtInt &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtLong &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtLongL &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtUShort &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtUInt &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtULong &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtULongL &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtFloat &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtFloatD &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtFloatL &fmt) |
Append operator to append formatted number field. More... | |
template<class T > | |
String & | operator<< (const FmtFieldNum< T > &fmt) |
Append operator to append formatted number field. More... | |
template<class T > | |
String & | operator<< (const FmtFieldFloat< T > &fmt) |
Append operator to append formatted number field. More... | |
String & | operator<< (const FmtPtr &fmtptr) |
Append operator to append formatted pointer field. More... | |
String & | operator<< (const FmtDump &fmt) |
Append operator to append data dump. More... | |
String & | operator= (String &&src) |
Move assignment operator (C++11). More... | |
String & | operator= (const char16_t *str) |
Assignment operator to set and convert from terminated UTF-16 string. More... | |
String & | operator= (const String &str) |
Assignment operator. More... | |
String & | operator= (const ListType &str) |
Assignment operator. More... | |
String & | operator= (const ListType *str) |
Assignment operator for pointer. More... | |
String & | operator= (const StringBase &data) |
Assignment operator to copy from base list type. More... | |
String & | operator= (const char *str) |
Assignment operator for null terminated string. More... | |
String & | operator= (const PtrBase< char > &str) |
Assignment operator to copy from managed pointer with null terminated string. More... | |
template<class T > | |
String & | operator= (const ListBase< wchar16, T > &str) |
Assignment operator to convert from UTF-16 string to UTF-8 string. More... | |
String & | operator= (const ValNull &) |
Assignment operator to set as null and empty. More... | |
String & | operator= (const ValEmpty &) |
Assignment operator to set as empty but not null. More... | |
bool | operator== (const ListBaseType &data) const |
Equality operator. More... | |
bool | operator== (const String &str) const |
Equality operator. More... | |
bool | operator== (const char *str) const |
Equality operator. More... | |
template<class T > | |
bool | operator== (const ListBase< wchar16, T > &str) |
Equality operator to compare against UTF-16 string. More... | |
const Item & | operator[] (Key index) const |
Get item at position (const). More... | |
bool | pop (char &item, Key index) |
Pop a copy of given item (modifier). More... | |
bool | pop (char &item) |
Pop a copy of last item (stack) (modifier). More... | |
const Item * | pop () |
Pop last item (stack). More... | |
bool | popq (char &item) |
Pop a copy of first item (queue) (modifier). More... | |
const Item * | popq () |
Pop first item (queue). More... | |
ListType & | prepend (const Item *data, Size size) |
Prepend new items copied from data pointer (modifier). More... | |
String & | prepend (char ch) |
Prepend character (modifier). More... | |
String & | prepend (char ch, Size count) |
Prepend copies of the same character (modifier). More... | |
String & | prepend (const ListType &str) |
Prepend from another string (modifier). More... | |
String & | prepend (const StringBase &str) |
Prepend from another string (modifier). More... | |
String & | prepend (const char *str, Size size) |
Prepend from string pointer (modifier). More... | |
String & | prepend (const char *str) |
Prepend null terminated string (modifier). More... | |
String & | prependn (int num, int base=fDEC) |
Prepend formatted signed number (modifier). More... | |
String & | prependn (long num, int base=fDEC) |
Prepend formatted signed number (modifier). More... | |
String & | prependn (longl num, int base=fDEC) |
Prepend formatted signed number (modifier). More... | |
String & | prependn (uint num, int base=fDEC) |
Prepend formatted unsigned number (modifier). More... | |
String & | prependn (ulong num, int base=fDEC) |
Prepend formatted unsigned number (modifier). More... | |
String & | prependn (ulongl num, int base=fDEC) |
Prepend formatted unsigned number (modifier). More... | |
String & | prependn (float num, int precision=fPREC_AUTO) |
Prepend formatted floating point number (modifier). More... | |
String & | prependn (double num, int precision=fPREC_AUTO) |
Prepend formatted floating point number (modifier). More... | |
String & | prependn (ldouble num, int precision=fPREC_AUTO) |
Prepend formatted floating point number (modifier). More... | |
ListType & | prependnew (Size size=1) |
Prepend new items (modifier). More... | |
String & | prependsep (char delim=',') |
Prepend separator/delimiter if needed (modifier). More... | |
Size | remove (Key index, Size size=1) |
Remove items (modifier). More... | |
ListType & | replace (Key index, Size rsize, const Item *data, Size size) |
Replace items with new data (modifier). More... | |
String & | replace (Key index, Size rsize, const StringBase &str) |
Replace characters with string (modifier). More... | |
String & | replace (Key index, Size rsize, const char *str, Size size) |
Replace characters with string (modifier). More... | |
String & | replace (Key index, Size rsize, const char *str) |
Replace characters with string (modifier). More... | |
ListType & | reserve (Size size, bool prefer_realloc=false) |
Reserve capacity for additional items (modifier). More... | |
String & | reserve (Size size, bool prefer_realloc=false) |
Reserve capacity for additional items (modifier). More... | |
ListType & | resize (Size size) |
Resize while preserving existing data (modifier). More... | |
String & | resize (Size size) |
Resize while preserving existing data (modifier). More... | |
String & | reverse () |
Reverse item order (modifier). More... | |
ListType & | set (const Item *data, Size size) |
Set from data pointer. More... | |
ListType & | set (const PtrBase< Item > &data, Size size) |
Set from managed data pointer. More... | |
ListType & | set (const ListType &data) |
Set from another list. More... | |
ListType & | set (const ListType &data, Key index, Key size=ALL) |
Set from subset of another list. More... | |
ListType & | set (const ListBaseType &data, Key index=0, Key size=ALL) |
Set as copy of sublist. More... | |
String & | set () |
Set as null and empty. More... | |
String & | set (const ListType &str) |
Set from another string. More... | |
String & | set (const ListType &str, Key index, Key size=ALL) |
Set from substring of another string. More... | |
String & | set (const StringBase &data, Key index=0, Key size=ALL) |
Set as copy of substring. More... | |
String & | set (const char *str, Size size) |
Set from string pointer. More... | |
String & | set (const PtrBase< char > &str, Size size) |
Set from managed string pointer. More... | |
String & | set (const char *str) |
Set from terminated string. More... | |
String & | set (const PtrBase< char > &str) |
Set as copy of null terminated string from managed pointer. More... | |
ListType & | set2 (const ListType &data, Key index1, Key index2) |
Set from subset of another list using start/end positions. More... | |
ListType & | set2 (const ListBaseType &data, Key index1, Key index2) |
Set as copy of sublist using start/end positions. More... | |
String & | set2 (const ListType &str, Key index1, Key index2) |
Set from substring of another string using start/end positions. More... | |
String & | set2 (const StringBase &data, Key index1, Key index2) |
Set and reference sublist using start/end positions. More... | |
bool | set_unicode (const wchar16 *str, Size size, UtfMode mode=umREPLACE_INVALID) |
Set as normal UTF-8 string converted from a raw UTF-16 string. More... | |
bool | set_unicode (const wchar16 *str, UtfMode mode=umREPLACE_INVALID) |
Set as normal UTF-8 string converted from a raw terminated UTF-16 string. More... | |
bool | set_unicode (const char16_t *str, Size size, UtfMode mode=umREPLACE_INVALID) |
Set as normal UTF-8 string converted from a raw UTF-16 string. More... | |
bool | set_unicode (const char16_t *str, UtfMode mode=umREPLACE_INVALID) |
Set as normal UTF-8 string converted from a raw terminated UTF-16 string. More... | |
String & | set_win32 (const WCHAR *str, int size) |
Set as normal (UTF-8) string converted from a Windows UTF-16 (WCHAR) string (Windows only). More... | |
String & | set_win32 (const WCHAR *str) |
Set as normal (UTF-8) string converted from a terminated Windows UTF-16 (WCHAR) string (Windows only). More... | |
String & | setempty () |
Set as empty but not null. More... | |
String & | setn (int num, int base=fDEC) |
Set as formatted signed number (modifier). More... | |
String & | setn (long num, int base=fDEC) |
Set as formatted signed number (modifier). More... | |
String & | setn (longl num, int base=fDEC) |
Set as formatted signed number (modifier). More... | |
String & | setn (uint num, int base=fDEC) |
Set as formatted unsigned number (modifier). More... | |
String & | setn (ulong num, int base=fDEC) |
Set as formatted unsigned number (modifier). More... | |
String & | setn (ulongl num, int base=fDEC) |
Set as formatted unsigned number (modifier). More... | |
String & | setn (float num, int precision=fPREC_AUTO) |
Set as formatted floating point number (modifier). More... | |
String & | setn (double num, int precision=fPREC_AUTO) |
Set as formatted floating point number (modifier). More... | |
String & | setn (ldouble num, int precision=fPREC_AUTO) |
Set as formatted floating point number (modifier). More... | |
bool | shared () const |
Get whether shared. More... | |
Size | size () const |
Get size. More... | |
ListType & | slice (Key index) |
Slice beginning items. More... | |
ListType & | slice (Key index, Size size) |
Slice to given sublist. More... | |
String & | slice (Key index) |
Slice beginning items. More... | |
String & | slice (Key index, Size size) |
Slice to given sublist. More... | |
ListType & | slice2 (Key index1, Key index2) |
Slice to given sublist using start/end positions. More... | |
String & | slice2 (Key index1, Key index2) |
Slice to given sublist using start/end positions. More... | |
template<class T1 , class T2 > | |
bool | split (char delim, T1 &left, T2 &right) const |
Split at first occurrence of delimiter into left/right substrings. More... | |
template<class T1 > | |
bool | split (char delim, T1 &left) const |
Split at first occurrence of delimiter into left substring. More... | |
template<class T2 > | |
bool | split (char delim, ValNull left, T2 &right) const |
Split at first occurrence of delimiter into right substring. More... | |
template<class Tok , class C > | |
C::Size | split (C &items, char delim=',') const |
Split delimited string into item list using given tokenizer. More... | |
bool | splitat (Key index, T1 &left, T2 &right) const |
Split into left/right sublists at index. More... | |
bool | splitat (Key index, T1 &left) const |
Split into left sublist at index. More... | |
bool | splitat (Key index, ValNull left, T2 &right) const |
Split into right sublist at index. More... | |
bool | splitat_setl (Key index) |
Split at index and set as left sublist. More... | |
bool | splitat_setl (Key index, T2 &right) |
Split at index, set as left sublist, and save right sublist. More... | |
bool | splitat_setr (Key index) |
Split at index and set as right sublist. More... | |
bool | splitat_setr (Key index, T1 &left) |
Split at index, set as right sublist, and save left sublist. More... | |
template<class C > | |
C::Size | splitmap (C &map, char delim=',', char kvdelim='=') const |
Split delimited string into map key/value items. More... | |
template<class T1 , class T2 > | |
bool | splitr (char delim, T1 &left, T2 &right) const |
Split at last occurrence of delimiter into left/right substrings. More... | |
template<class T1 > | |
bool | splitr (char delim, T1 &left) const |
Split at last occurrence of delimiter into left substring. More... | |
template<class T2 > | |
bool | splitr (char delim, ValNull left, T2 &right) const |
Split at last occurrence of delimiter into right substring. More... | |
bool | starts (const Item *items, Size size) const |
Check if starts with given items. More... | |
bool | starts (const ListBaseType &items) const |
Check if this starts with given items. More... | |
bool | starts (char ch) const |
Check if this starts with given character. More... | |
String & | strip () |
Strip left (beginning) and right (ending) whitespace (spaces and tabs). More... | |
String & | strip (char ch) |
Strip left (beginning) and right (ending) occurences of character. More... | |
String & | strip2 () |
Strip left (beginning) and right (ending) whitespace from string, including newlines. More... | |
String & | strip_newlines () |
Strip left (beginning) and right (ending) newlines from string. More... | |
String & | stripl () |
Strip left (beginning) whitespace (spaces and tabs). More... | |
String & | stripl (char ch, Size max=ALL) |
Strip left (beginning) occurrences of character. More... | |
String & | stripl (const char *str, Size strsize, Size max=ALL) |
Strip left (beginning) occurrences of string. More... | |
String & | stripl2 () |
Strip left (beginning) whitespace from string, including newlines. More... | |
String & | stripl_newlines () |
Strip all left (beginning) newlines from string. More... | |
String & | stripl_newlines (Size max) |
Strip left (beginning) newlines from string. More... | |
String & | stripr () |
Strip right (ending) whitespace (spaces and tabs). More... | |
String & | stripr (char ch, Size max=ALL) |
Strip right (ending) occurences of character. More... | |
String & | stripr (const char *str, Size strsize, Size max=ALL) |
Strip right (ending) occurences of string. More... | |
String & | stripr2 () |
Strip right (ending) whitespace (including newlines) from string. More... | |
String & | stripr_newlines () |
Strip all right (ending) newlines from string. More... | |
String & | stripr_newlines (Size max) |
Strip right (ending) newlines from string. More... | |
void | swap (Key index1, Key index2) |
Swap items. More... | |
void | swap (ListType &list) |
Swap with another list. More... | |
template<class StringT > | |
bool | token (StringT &value, char delim) |
Extract next token from string. More... | |
template<class StringT > | |
bool | token_any (StringT &value, Char &found_delim, const char *delims, Size count) |
Extract next token from string using any of given delimiters. More... | |
template<class StringT > | |
bool | token_line (StringT &line) |
Extract next line from string. More... | |
template<class StringT > | |
bool | tokenr (StringT &value, char delim) |
Extract next token from string in reverse (from end of string). More... | |
template<class StringT > | |
bool | tokenr_any (StringT &value, Char &found_delim, const char *delims, Size count) |
Extract next token from string in reverse (from end of string) using any of given delimiters. More... | |
template<class StringT > | |
bool | tokenr_line (StringT &line) |
Extract next line from string in reverse (from end of string). More... | |
ThisType & | tolower () |
Convert all uppercase characters in string to lowercase (modifier). More... | |
ThisType & | toupper () |
Convert all lowercase characters in string to uppercase (modifier). More... | |
ListType & | triml (Size size) |
Trim left (beginning) items. More... | |
String & | triml (Size size) |
Trim left (beginning) items. More... | |
ListType & | trimr (Size size) |
Trim right (ending) items. More... | |
String & | trimr (Size size) |
Trim right (ending) items. More... | |
ListType & | truncate (Size size=0) |
Truncate to given size. More... | |
String & | truncate (Size size=0) |
Truncate to given size. More... | |
String & | unshare () |
Make data unique by allocating new buffer, if needed (modifier). More... | |
String & | unslice () |
Clean and remove hidden items previously removed via slicing (modifier). More... | |
char * | write_direct (Size size) |
Get pointer for writing directly to buffer to append data. More... | |
bool | write_direct_finish (Size size) |
Finish writing directly to buffer. More... | |
char * | write_direct_flush (Size &available, Size written_size, Size reserve_size) |
Flush data written directly to buffer and get pointer for appending more. More... | |
char * | write_direct_multi (Size &available, Size reserve_size) |
Get pointer for writing directly to buffer to append data and allow multiple passes for larger sizes. More... | |
Out & | write_out () |
Get parent output string. More... | |
Size | writebin (const char *buf, Size size) |
Write (append) to string. More... | |
Size | writechar (char ch, Size count=1) |
Write (append) repeat character as text output to string. More... | |
bool | writefmtchar (char ch, Size count, const FmtSetField &field) |
Write (append) formatted and/or repeated character. More... | |
bool | writefmtdump (const FmtDump &fmt, const char *newline, uint newlinesize) |
Write formatted data dump. More... | |
bool | writefmtdump (const FmtDump &fmt, Newline nl=NL_SYS) |
Write formatted data dump. More... | |
template<class TNum > | |
bool | writefmtnum (TNum num, const FmtSetInt &fmt, const FmtSetField *field=NULL) |
Write (append) formatted signed number with field alignment. More... | |
template<class TNum > | |
bool | writefmtnumf (TNum num, const FmtSetFloat &fmt, const FmtSetField *field=NULL) |
Write (append) formatted floating point number with field alignment. More... | |
template<class TNum > | |
bool | writefmtnumu (TNum num, const FmtSetInt &fmt, const FmtSetField *field=NULL) |
Write (append) formatted unsigned number with field alignment. More... | |
bool | writefmtstr (const char *str, Size size, const FmtSetField &field) |
Write (append) text with field alignment. More... | |
template<class TNum > | |
bool | writenum (TNum num, int base=fDEC) |
Write (append) formatted signed number. More... | |
template<class TNum > | |
bool | writenumf (TNum num, int precision=fPREC_AUTO) |
Write (append) formatted floating-point number. More... | |
template<class TNum > | |
bool | writenumu (TNum num, int base=fDEC) |
Write (append) formatted unsigned number. More... | |
Size | writequoted (const char *buf, Size size, char delim, bool optional=false) |
Write (append) quoted output to string. More... | |
Size | writetext (const char *buf, Size size) |
Write (append) text output to string. More... | |
Static Public Member Functions | |
static const String & | digits () |
Get string of all ASCII alphanumeric digits with uppercase letters (0-9, A-Z). More... | |
static const String & | digitsl () |
Get string of all ASCII alphanumeric digits with lowercase letters (0-9, a-z). More... | |
static const String & | letters () |
Get string of ASCII letters (A-z). More... | |
static const String & | lettersl () |
Get string of ASCII lowercase letters (a-z). More... | |
static const String & | lettersu () |
Get string of ASCII uppercase letters (A-Z). More... | |
static const String & | whitespace () |
Get string of ASCII whitespace characters (space, tab). More... | |
Public Attributes | |
char * | data_ |
Data pointer, NULL if null. More... | |
StrSizeT | size_ |
Data size as item count, 0 if empty or null. More... | |
Protected Member Functions | |
void | ref (const ListType &data) |
Set as reference to another list. More... | |
void | ref (const ListType &data, Size index, Size size) |
Set as sliced reference to another list. More... | |
void | ref (const Item *data, Size size, bool term=false) |
Set as reference to given data. More... | |
Protected Attributes | |
Buf | buf_ |
List buffer. More... | |
|
inherited |
|
inherited |
Item type (same as Value)
Item type as parameter (POD types passed by value, otherwise by const-ref)
|
inherited |
Iterator (const) - IteratorRa.
|
inherited |
Iterator (mutable) - IteratorRa.
|
inherited |
List base type for any Evo list
Type returned by write_out()
typedef ListBaseType StringBase |
Alias for ListBaseType.
typedef ListBase<wchar16,Size> UnicodeStringBase |
Base for UnicodeString.
|
inherited |
Value type (same as Item)
|
inline |
Default constructor sets as null.
Copy constructor.
str | String pointer to copy from, ignored if null |
Extended copy constructor.
str | String to copy |
index | Start index of string to copy, END to set as empty |
size | Size as character count, ALL for all from index |
|
inline |
Constructor to copy substring data.
str | SubString to copy |
index | Start index of string to copy, END to set as empty |
size | Size as character count, ALL for all from index |
Constructor for string pointer.
str | String pointer to use |
size | String size as character count |
Constructor for managed string pointer.
str | String pointer, calls set() if null |
size | String size as character count |
|
inline |
Constructor to convert from UTF-16 string to UTF-8 string.
str | UTF-16 string to convert from |
|
inline |
Constructor for null terminated string.
str | String pointer, calls set() if null – must be terminated |
Constructor to copy null terminated string from managed pointer.
str | String pointer, calls set() if null – must be terminated |
|
inline |
Constructor to initialize and convert from UTF-16 string literal (using u
prefix).
str | String literal, NULL to set as null |
size | String size in UTF-16 chars |
mode | How to handle invalid UTF-16 values, see set_unicode() |
|
inline |
Constructor to initialize and convert from terminated UTF-16 string literal (using u
prefix).
str | UTF-16 string, NULL to set as null, otherwise must be terminated |
mode | How to handle invalid UTF-16 values, see set_unicode() |
|
inline |
Sequence constructor (C++11).
init | Initializer list, passed as comma-separated values in braces { } |
|
inline |
Append character (modifier).
ch | Character to append |
Append copies of the same character (modifier).
ch | Character to append |
count | Character copies to append |
Append from another string (modifier).
str | String to append |
|
inline |
Append from another string (modifier).
str | String to append |
Append from string pointer (modifier).
str | String to append |
size | String size as character count to append |
|
inline |
Append null terminated string (modifier).
str | String to append – must be terminated |
Append new items up to a given minimum size (modifier).
minsize | Minimum list size |
Append formatted signed number (modifier).
num | Number to append |
base | Base to use for formatting |
Append formatted signed number (modifier).
num | Number to append |
base | Base to use for formatting |
Append formatted signed number (modifier).
num | Number to append |
base | Base to use for formatting |
Append formatted unsigned number (modifier).
num | Number to append |
base | Base to use for formatting |
Append formatted unsigned number (modifier).
num | Number to append |
base | Base to use for formatting |
Append formatted unsigned number (modifier).
num | Number to append |
base | Base to use for formatting |
|
inline |
Append formatted floating point number (modifier).
num | Number to append |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Append formatted floating point number (modifier).
num | Number to append |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Append formatted floating point number (modifier).
num | Number to append |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Append separator/delimiter if needed (modifier).
delim | Delimiter to append |
|
inlineinherited |
Advanced: Append new items without initializing (constructing) them.
size | Size to append |
|
inlineinherited |
Advanced: Resize and get buffer pointer (modifier).
size | Size to resize to |
|
inlineinherited |
Advanced: Get buffer pointer (modifier).
|
inlineinherited |
Advanced: Start optimized in-place/buffer edit.
edit | Edit buffer data, use 'edit.ptr' |
minsize | Minimum buffer size needed, must be positive |
inplace | Whether to try in-place edit, false to always use new buffer |
|
inlineinherited |
|
inlineinherited |
Advanced: Get first item (modifier).
Advanced: Insert new items without initializing (constructing) them.
index | Insert index (END for end of list) |
size | Insert data size |
|
inlineinherited |
Advanced: Get item (mutable).
index | Item index |
|
inlineinherited |
Advanced: Get last item (modifier).
|
inlineinherited |
Advanced: Prepend new items without initializing (constructing) them.
size | Size to prepend |
Advanced: Remove given items without uninitializing (destructing) them.
index | Remove index |
size | Remove size as item count, ALL for all from index |
Advanced: Resize while preserving existing data, POD items not initialized (modifier).
size | New size as item count |
Advanced: Resize while preserving existing data, POD items not initialized (modifier).
size | New size as item count |
|
inlineinherited |
Advanced: Set new size after writing directly to buffer.
size | New size |
Advanced: Swap given items.
index1 | Index of first item to swap |
index2 | Index of second item to swap |
|
inlineinherited |
Advanced: Get buffer pointer to write/append (modifier).
addsize | Max size to write/append, must be at least 1 |
|
inlineinherited |
Advanced: Update size added after writing directly to buffer.
addsize | Actual size written |
|
inline |
Explicitly use a const reference to this.
|
inline |
|
inline |
Get iterator at first item (const).
|
inline |
Convert to bool value.
Fails on bad format, empty, or number overflow.
Format: [WHITESPACE] ["on"|"off"|"yes"|"no"|"true"|"false"|"t"|"f"|DIGITS] [WHITESPACE]
Set new capacity (modifier).
size | New capacity |
|
inline |
Set new capacity (modifier).
size | New capacity |
Set maximum capacity (modifier).
max | Maximum capacity |
Set maximum capacity (modifier).
max | Maximum capacity |
Set minimum capacity (modifier).
min | Minimum capacity |
Set minimum capacity (modifier).
min | Minimum capacity |
|
inline |
|
inline |
|
inline |
Clear by removing all items.
|
inline |
Reduce capacity to fit current size (modifier).
|
inlineinherited |
Comparison.
data | Data to compare to |
|
inline |
Comparison against UTF-16 string.
T | Inferred from argument |
str | String to compare to |
Check if contains given data.
data | Data to check for |
size | Size as item count to check for |
|
inline |
Check whether this contains given character.
ch | Character to check for |
|
inline |
Check whether this contains given string.
str | Pointer to string to check for |
size | String size in bytes |
|
inline |
Check whether contains given string.
str | String to check for |
|
inline |
Convert string to value of given type.
C | Type to convert to |
|
inline |
Convert value to string, appending to current string.
C | Type to convert from, inferred from argument |
value | Value to convert |
|
inline |
Convert value to string with quoting as needed, appending to current string.
C | Type to convert from, inferred from argument |
value | Value to convert |
delim | Delimiter to use to determine quoting needed – this is not added to string |
|
inline |
Convert value to string, replacing current string.
C | Type to convert from, inferred from argument |
value | Value to convert |
Set as full (unshared) copy using data pointer (modifier).
data | Data to copy |
size | Data size as item count |
Set as full (unshared) copy of another string (modifier).
str | String to copy |
|
inline |
Set as full (unshared) copy of substring (modifier).
str | String to copy |
Set as full (unshared) copy using string pointer (modifier).
str | String to copy |
size | String size as character count |
|
inline |
Set as full (unshared) copy of null terminated string (modifier).
str | String to copy – must be terminated |
|
inline |
Get terminated string pointer, using given string buffer if needed (const).
buffer | Buffer to use, if needed |
|
inline |
Get terminated string pointer (modifier).
|
inline |
Get terminated string pointer (modifier).
|
inline |
Get string pointer (const).
|
inlineinherited |
|
inlinestatic |
Get string of all ASCII alphanumeric digits with uppercase letters (0-9, A-Z).
|
inlinestatic |
Get string of all ASCII alphanumeric digits with lowercase letters (0-9, a-z).
|
inlineinherited |
|
inline |
|
inline |
Get iterator at end.
Check if this ends with given items.
items | Items to check |
size | Item count to check |
|
inlineinherited |
Check if this ends with given items.
items | Items to check |
|
inline |
Check if this ends with given character.
ch | Character to check |
Fill using item (modifier).
item | Item to fill with |
index | Start index, END to start at end and append |
size | Size to fill as item count from index, ALL for all items from index, 0 to do nothing |
Fill with copies of character (modifier).
ch | Character to fill with |
index | Start index, END to start at end and append |
size | Size to fill as character count from index, ALL for all items from index, 0 to do nothing |
Find first occurrence of item with forward search.
item | Item to find |
start | Starting index for search |
end | End index for search, END for end of list |
|
inline |
Find first occurrence of character with forward search.
ch | Character to find |
Find first occurrence of character with forward search.
ch | Character to find |
start | Starting index for search |
end | End index for search, END for end of string |
Find first occurrence of pattern string.
pattern | Pointer to pattern to look for, must not be NULL |
pattern_size | Pattern size in bytes |
start | Starting index for search |
end | End index for search, END for end of string |
pattern_size=0
|
inline |
Find first occurrence of pattern string using specified algorithm.
alg | Search algorithm to use, see StringSearchAlg |
pattern | Pointer to pattern to look for, must not be NULL |
pattern_size | Pattern size in bytes |
start | Starting index for search |
end | End index for search, END for end of string |
pattern_size=0
|
inline |
Find first occurrence of pattern string.
pattern | Pattern to look for |
start | Starting index for search |
end | End index for search, END for end of string |
pattern
is empty
|
inline |
Find first occurrence of pattern string using specified algorithm.
alg | Search algorithm to use, see StringSearchAlg |
pattern | Pattern to look for |
start | Starting index for search |
end | End index for search, END for end of string |
pattern_size=0
Find first occurrence of any given items with forward search.
items | Items to search for |
count | Count of items to search for |
start | Starting index for search |
end | End index for search, END for end of list |
Find first occurrence of any given characters with forward search.
chars | Characters to search for, must not contain multi-byte chars |
count | Character count to search for |
start | Starting index for search |
end | End index for search, END for end of list |
count=0
|
inline |
Find first occurrence of any given characters with forward search.
chars | Characters to search for, must not contain multi-byte chars |
start | Starting index for search |
end | End index for search, END for end of list |
chars
is empty Find first occurrence of any character not listed with forward search.
chars
chars | Excluded characters, must not contain multi-byte chars |
count | Excluded character count |
start | Starting index for search |
end | End index for search, END for end of list |
|
inline |
Find first occurrence of any character not listed with forward search.
chars
chars | Excluded characters, must not contain multi-byte chars |
start | Starting index for search |
end | End index for search, END for end of list |
Find last occurrence of any character not listed with reverse search.
chars
chars | Excluded characters, must not contain multi-byte chars |
count | Excluded character count |
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
|
inline |
Find last occurrence of any character not listed with reverse search.
chars
chars | Excluded characters, must not contain multi-byte chars |
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
Find last occurrence of any given items with reverse search.
items | Items to search for |
count | Count of items to search for |
start | Starting index for search range – last item checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
Find last occurrence of any given characters with reverse search.
chars | Characters to search for, must not contain multi-byte chars |
count | Character count to search for |
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
count=0
|
inline |
Find last occurrence of any given characters with reverse search.
chars | Characters to search for, must not contain multi-byte chars |
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
chars
is empty Find first non-word word character.
start | Starting index for search |
end | End index for search, END for end of list |
Find last non-word character with reverse search.
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
Find last occurrence of item with reverse search.
item | Item to find |
start | Starting index for search range – last item checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
|
inline |
Find last occurrence of character with reverse search.
ch | Character to find |
Find last occurrence of character with reverse search.
ch | Character to find |
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of string |
Find last occurrence of pattern string with reverse search.
pattern | Pointer to pattern to look for, must not be NULL |
pattern_size | Pattern size in bytes |
start | Starting index for search |
end | End index for search, END for end of string |
pattern
is empty
|
inline |
Find last occurrence of pattern string with reverse search.
alg | Search algorithm to use, see StringSearchAlg |
pattern | Pointer to pattern to look for, must not be NULL |
pattern_size | Pattern size in bytes |
start | Starting index for search |
end | End index for search, END for end of string |
pattern
is empty
|
inline |
Find last occurrence of pattern string with reverse search.
pattern | Pattern to look for |
start | Starting index for search |
end | End index for search, END for end of string |
pattern
is empty
|
inline |
Find last occurrence of pattern string with reverse search.
alg | Search algorithm to use, see StringSearchAlg |
pattern | Pattern to look for |
start | Starting index for search |
end | End index for search, END for end of string |
pattern
is empty Find character and replace with string (modifier).
ch | Character to find |
str | Replacement string pointer |
size | Replacement string size |
max | Max occurrences to find and replace, ALL for all |
|
inline |
Find character and replace with string (modifier).
ch | Character to find |
str | Replacement string |
max | Max occurrences to find and replace, ALL for all |
|
inline |
Find string and replace with string (modifier).
fstr | Pointer to string to find and replace |
fsize | String size to find and replace |
str | Replacement string pointer |
size | Replacement string size |
max | Max occurrences to find and replace, ALL for all |
|
inline |
Find string and replace with string (modifier).
fstr | Pointer to string to find and replace |
fsize | String size to find and replace |
str | Replacement string |
max | Max occurrences to find and replace, ALL for all |
|
inline |
Find string and replace with string (modifier).
fstr | String to find and replace |
str | Replacement string |
max | Max occurrences to find and replace, ALL for all |
|
inline |
Find string and replace with string (modifier).
fstr | String to find and replace |
str | Replacement string pointer |
size | Replacement string size |
max | Max occurrences to find and replace, ALL for all |
Find first word character.
start | Starting index for search |
end | End index for search, END for end of list |
Find last word character with reverse search.
start | Starting index for search range – last character checked in reverse search |
end | End index for search range (reverse search starting point), END for end of list |
|
inlineinherited |
Get first item (const).
|
inlineinherited |
Get first item (mutable).
|
inline |
Convert to bool value for given boolean type.
Fails on bad format, empty, or number overflow.
Format: [WHITESPACE] ["on"|"off"|"yes"|"no"|"true"|"false"|"t"|"f"|DIGITS] [WHITESPACE]
Error codes:
error | Stores conversion error code, ENone on success [out] |
|
inline |
Convert to bool value for given boolean type.
Fails on bad format, empty, or number overflow
Format: [WHITESPACE] ["on"|"off"|"yes"|"no"|"true"|"false"|"t"|"f"|DIGITS] [WHITESPACE]
T | Boolean type to convert to – can be Bool or bool |
|
inline |
Convert to number value for given integer type.
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
Error codes:
T | Basic integer type to convert to – must be primitive like: int32, int, long, uint32, uint, ulong, etc |
error | Stores conversion error code, ENone on success [out] |
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value for given integer type.
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
T | Integer type to convert to – can be IntegerT type like Int32, Int, ULong, etc or primitive like int32, int, ulong, etc |
base | Conversion base, 0 for autodetect |
|
inline |
Convert to floating point number value for given type.
Fails on bad format or no digits.
Format: [WHITESPACE] ("nan" | NUMBER) [WHITESPACE]
Error codes:
T | Basic floating point type to convert to – must be primitive like: float, double, ldouble |
error | Stores conversion error code, ENone on success [out] |
|
inline |
Convert to floating point number value for given type.
Fails on bad format or no digits.
Format: [WHITESPACE] ("nan" | NUMBER) [WHITESPACE]
T | Floating point type to convert to – can be FloatT type like Float, FloatD, etc or primitive like float, double, etc |
|
inlineinherited |
Get data hash value.
seed | Seed value for hashing multiple values, 0 if none |
Get index from last item using offset.
offset | Offset from end, 0 for last item, 1 for second-last, etc |
Insert new items copied from data pointer (modifier).
index | Insert index, END to append |
data | Data to insert |
size | Size as item count to insert |
|
inlineinherited |
Insert new items copied from another list (modifier).
index | Insert index, END to append |
data | Data to insert |
Insert new item (modifier).
index | Insert index, END to append |
data | Data to insert |
Insert character (modifier).
index | Insert index, END to append |
ch | Character to insert |
Insert copies of the same character (modifier).
index | Insert index, END to append |
ch | Character to insert |
count | Character copies to insert |
Insert from another string (modifier).
index | Insert index, END to append |
str | String to insert |
|
inline |
Insert from another string (modifier).
index | Insert index, END to append |
str | String to insert |
Insert string data (modifier).
index | Insert index, END to append |
str | String to insert |
size | String size as character count to insert |
Insert null terminated string (modifier).
index | Insert index, END to append |
str | String to insert – must be terminated |
Insert formatted signed number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
Insert formatted signed number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
Insert formatted signed number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
Insert formatted unsigned number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
Insert formatted unsigned number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
Insert formatted unsigned number (modifier).
index | Insert index, END to append |
num | Number to insert |
base | Base to use for formatting |
|
inline |
Insert formatted floating point number (modifier).
index | Insert index, END to append |
num | Number to insert |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Insert formatted floating point number (modifier).
index | Insert index, END to append |
num | Number to insert |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Insert formatted floating point number (modifier).
index | Insert index, END to append |
num | Number to insert |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
Insert new items (modifier).
index | Insert index, END to append |
size | Size as item count to insert |
Get item at position (const).
index | Item index |
|
inlineinherited |
Get item at position (mutable).
index | Item index |
|
inline |
Join list items into delimited string.
items | List items to join |
delim | Delimiter to use |
|
inline |
Join map items into delimited string.
map | Map to join |
delim | Item delimiter to use |
kvdelim | Key/Value delimiter to use |
|
inline |
Join map items into delimited string, with quoting as needed.
map | Map to join |
delim | Item delimiter to use |
kvdelim | Key/Value delimiter to use |
|
inline |
Join list items into delimited string, with quoting as needed.
items | List items to join |
delim | Delimiter to use |
|
inlineinherited |
Get last item (const).
|
inlineinherited |
|
inlinestatic |
Get string of ASCII letters (A-z).
|
inlinestatic |
Get string of ASCII lowercase letters (a-z).
|
inlinestatic |
Get string of ASCII uppercase letters (A-Z).
Move item to position (modifier).
dest | Destination index to move item to, END to move to end |
index | Item index to move from |
Move items from another list.
dest | Destination index to insert moved items, END for append |
src | Source to move from |
srcindex | Source index to move items from |
size | Size as item count to move from source |
|
inlineinherited |
Get whether null.
|
inline |
Convert to number value (signed).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value (floating point).
Fails on bad format or no digits.
Format: [WHITESPACE] ("nan" | NUMBER) [WHITESPACE]
|
inline |
Convert to number value (double floating point).
Fails on bad format or no digits.
Format: [WHITESPACE] ("nan" | NUMBER) [WHITESPACE]
|
inline |
Convert to number value (ldouble floating point).
Fails on bad format or no digits.
Format: [WHITESPACE] ("nan" | NUMBER) [WHITESPACE]
|
inline |
Convert to number value (signed long).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value (signed long-long).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value (unsigned).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value (unsigned long).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inline |
Convert to number value (unsigned long-long).
Fails on bad format, no digits, or overflow.
Format: [WHITESPACE] ["+"|"-"] ["0x"|"0X"|"x"|"0"] DIGITS [WHITESPACE]
base | Conversion base, 0 for autodetect |
|
inlineinherited |
Inequality operator.
data | Data to compare to |
|
inline |
Inequality operator.
str | String to compare to |
|
inline |
Inequality operator.
str | String to compare to – must be null terminated |
|
inline |
Inequality operator to compare against UTF-16 string.
T | Inferred from argument |
str | String to compare to |
|
inlineinherited |
Get item at position (mutable).
index | Item index |
|
inline |
|
inline |
Append operator.
ch | Character to append |
Append operator.
str | String to append |
|
inline |
Append operator.
str | String to append |
|
inline |
Append operator.
str | String pointer to append – must be null terminated |
Append operator to set as null and empty.
val | vNULL |
Append operator to set as empty but not null.
val | vEMPTY |
Append operator to append newline.
nl | Newline type, NL for system newline |
Flush output buffer – no-op for string.
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
|
inline |
Append operator to append formatted number.
num | Number to format and append |
Append operator to append formatted character field.
fmt | Character info |
Append operator to append formatted string field.
fmt | String formatting info |
|
inline |
Append operator to append formatted wrapped string column.
fmt | String formatting info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted number field.
fmt | Number info |
|
inline |
Append operator to append formatted number field.
fmt | Number info |
|
inline |
Append operator to append formatted number field.
fmt | Number info |
Append operator to append formatted pointer field.
fmtptr | Pointer info |
Append operator to append data dump.
fmt | Dump info |
Move assignment operator (C++11).
src | Source to move |
|
inline |
Assignment operator to set and convert from terminated UTF-16 string.
str | UTF-16 string, NULL to set as null |
Assignment operator.
str | String to copy |
Assignment operator.
str | String to copy |
|
inline |
Assignment operator to copy from base list type.
data | Data to copy |
|
inline |
Assignment operator for null terminated string.
str | String pointer, calls set() if null – must be terminated |
Assignment operator to copy from managed pointer with null terminated string.
str | String pointer, calls set() if null – must be terminated |
Assignment operator to convert from UTF-16 string to UTF-8 string.
str | UTF-16 string to convert from |
Assignment operator to set as empty but not null.
Example:
|
inlineinherited |
Equality operator.
data | Data to compare to |
|
inline |
Equality operator.
str | String to compare to |
|
inline |
Equality operator.
str | String to compare to – must be null terminated |
|
inline |
Equality operator to compare against UTF-16 string.
T | Inferred from argument |
str | String to compare to |
Get item at position (const).
index | Item index |
|
inlineinherited |
Pop a copy of given item (modifier).
item | Stores popped item [out] |
index | Index to pop |
|
inlineinherited |
Pop a copy of last item (stack) (modifier).
item | Stores popped item [out] |
|
inlineinherited |
|
inlineinherited |
Pop a copy of first item (queue) (modifier).
item | Stores popped item [out] |
|
inlineinherited |
|
inline |
Prepend character (modifier).
ch | Character to prepend |
Prepend copies of the same character (modifier).
ch | Character to prepend |
count | Character copies to prepend |
Prepend from another string (modifier).
str | String to prepend |
|
inline |
Prepend from another string (modifier).
str | String to prepend |
Prepend from string pointer (modifier).
str | String to prepend |
size | String size as character count to prepend |
|
inline |
Prepend null terminated string (modifier).
str | String to prepend – must be terminated |
Prepend formatted signed number (modifier).
num | Number to prepend |
base | Base to use for formatting |
Prepend formatted signed number (modifier).
num | Number to prepend |
base | Base to use for formatting |
Prepend formatted signed number (modifier).
num | Number to prepend |
base | Base to use for formatting |
Prepend formatted unsigned number (modifier).
num | Number to prepend |
base | Base to use for formatting |
Prepend formatted unsigned number (modifier).
num | Number to prepend |
base | Base to use for formatting |
Prepend formatted unsigned number (modifier).
num | Number to prepend |
base | Base to use for formatting |
|
inline |
Prepend formatted floating point number (modifier).
num | Number to prepend |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Prepend formatted floating point number (modifier).
num | Number to prepend |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Prepend formatted floating point number (modifier).
num | Number to prepend |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Prepend separator/delimiter if needed (modifier).
delim | Delimiter to prepend |
|
inlineprotectedinherited |
Set as reference to another list.
data | Data to reference |
Set as sliced reference to another list.
data | Data to reference |
index | Start index of data, END to set as empty |
size | Size as item count, ALL for all from index |
Set as reference to given data.
data | Data to reference |
size | Data size |
term | Whether referenced data is terminated |
Remove items (modifier).
index | Remove index |
size | Remove size, ALL for all items from index |
Replace items with new data (modifier).
index | Start index to replace |
rsize | Size as item count from index to replace, ALL for all items from index |
data | Replacement data to copy |
size | Replacement data size as item count |
|
inline |
Replace characters with string (modifier).
index | Start index to replace |
rsize | Size as item count from index to replace, ALL for all items from index |
str | Replacement string to copy – which may refer to a substring of this, as long as it doesn't overlap with the part being replaced |
Replace characters with string (modifier).
index | Start index to replace |
rsize | Size as item count from index to replace, ALL for all items from index |
str | Replacement string to copy – which may refer to a substring of this, as long as it doesn't overlap with the part being replaced |
size | Replacement string size as character count |
Replace characters with string (modifier).
index | Start index to replace |
rsize | Size as item count from index to replace, ALL for all items from index |
str | Replacement string to copy – must be terminated |
Reserve capacity for additional items (modifier).
size | Size as item count to reserve |
prefer_realloc | Advanced: True to prefer realloc for certain conditition where would otherwise unslice via alloc and move to new buffer |
Reserve capacity for additional items (modifier).
size | Size as item count to reserve |
prefer_realloc | Advanced: True to prefer realloc for certain conditition where would otherwise unslice via alloc and move to new buffer |
Resize while preserving existing data (modifier).
size | New size as item count |
Resize while preserving existing data (modifier).
size | New size as item count |
Set from data pointer.
data | Data pointer to use |
size | Data size as item count |
Set from managed data pointer.
data | Data pointer to copy |
size | Data size as item count |
Set from another list.
data | Data to copy |
Set from subset of another list.
data | Data to copy |
index | Start index of data, END to set as empty |
size | Data size as item count, ALL for all from index |
|
inlineinherited |
Set as copy of sublist.
data | Data to copy |
index | Start index of sublist data, END to set as empty |
size | Data size as item count, ALL for all from index |
|
inline |
Set as null and empty.
Set from another string.
str | String to copy |
Set from substring of another string.
str | String to copy |
index | Start index of data, END to set as empty |
size | Data size as item count, ALL for all from index |
|
inline |
Set as copy of substring.
data | Data to copy |
index | Start index of substring data, END to set as empty |
size | Data size as item count, ALL for all from index |
Set from string pointer.
str | String pointer, calls set() if null |
size | String size as character count |
Set from managed string pointer.
str | String pointer, calls set() if null |
size | String size as character count |
|
inline |
Set from terminated string.
str | String pointer, calls set() if null – must be terminated |
Set as copy of null terminated string from managed pointer.
str | String pointer, calls set() if null – must be terminated |
Set from subset of another list using start/end positions.
data | Data to copy |
index1 | Start index of new slice, END to slice all items from beginning |
index2 | End index of new slice (this item not included), END for all after index1 |
|
inlineinherited |
Set as copy of sublist using start/end positions.
data | Data to copy |
index1 | Start index of sublist data, END to set as empty |
index2 | End index of sublist data (this item not included), END for all after index1 |
Set from substring of another string using start/end positions.
str | String to copy |
index1 | Start index of data, END to set as empty |
index2 | End index of data (this item not included), END for all after index1 |
|
inline |
Set and reference sublist using start/end positions.
data | Data to reference |
index1 | Start index of sublist data, END to set as empty |
index2 | End index of sublist data (this item not included), END for all after index1 |
|
inline |
Set as normal UTF-8 string converted from a raw UTF-16 string.
str | Pointer to UTF-16 string to convert from, NULL to set as null |
size | String size to convert from, as wchar16 length (not bytes), ignored if str is NULL |
mode | How to handle invalid UTF-16 values:
|
|
inline |
Set as normal UTF-8 string converted from a raw terminated UTF-16 string.
str | Pointer to UTF-16 string to convert from, NULL to set as null, otherwise must be terminated |
mode | How to handle invalid UTF-16 values:
|
|
inline |
Set as normal UTF-8 string converted from a raw UTF-16 string.
str | Pointer to UTF-16 string to convert from, NULL to set as null |
size | String size to convert from, as wchar16 length (not bytes), ignored if str is NULL |
mode | How to handle invalid UTF-16 values:
|
|
inline |
Set as normal UTF-8 string converted from a raw terminated UTF-16 string.
str | Pointer to UTF-16 string to convert from, NULL to set as null, otherwise must be terminated |
mode | How to handle invalid UTF-16 values:
|
|
inline |
Set as normal (UTF-8) string converted from a Windows UTF-16 (WCHAR) string (Windows only).
str | UTF-16 string to convert, NULL to set as null |
size | String size in wide chars, 0 for empty |
|
inline |
Set as normal (UTF-8) string converted from a terminated Windows UTF-16 (WCHAR) string (Windows only).
str | UTF-16 string to convert (must be terminated), NULL to set as null |
|
inline |
Set as empty but not null.
Set as formatted signed number (modifier).
num | Number to set |
base | Base to use for formatting |
Set as formatted signed number (modifier).
num | Number to set |
base | Base to use for formatting |
Set as formatted signed number (modifier).
num | Number to set |
base | Base to use for formatting |
Set as formatted unsigned number (modifier).
num | Number to set |
base | Base to use for formatting |
Set as formatted unsigned number (modifier).
num | Number to set |
base | Base to use for formatting |
Set as formatted unsigned number (modifier).
num | Number to set |
base | Base to use for formatting |
|
inline |
Set as formatted floating point number (modifier).
num | Number to set |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Set as formatted floating point number (modifier).
num | Number to set |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Set as formatted floating point number (modifier).
num | Number to set |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inlineinherited |
Get whether shared.
|
inlineinherited |
Get size.
Slice beginning items.
index | Start index of new slice, END to slice (remove) all items from beginning |
Slice to given sublist.
index | Start index of new slice, END to slice (remove) all items from beginning |
size | Slice size as item count, ALL for all from index |
Slice beginning items.
index | Start index of new slice, END to slice (remove) all items from beginning |
Slice to given sublist.
index | Start index of new slice, END to slice (remove) all items from beginning |
size | Slice size as item count, ALL for all from index |
Slice to given sublist using start/end positions.
index1 | Start index of new slice, END to slice all items from beginning |
index2 | End index of new slice (this item not included), END for all after index1 |
Slice to given sublist using start/end positions.
index1 | Start index of new slice, END to slice all items from beginning |
index2 | End index of new slice (this item not included), END for all after index1 |
|
inline |
Split at first occurrence of delimiter into left/right substrings.
T1 | String type to store left substring |
T2 | String type to store right substring |
delim | Delimiter to find |
left | Set to substring before delim, set to this if not found [out] |
right | Set to substring after delim, null if not found [out] |
|
inline |
Split at first occurrence of delimiter into left substring.
T1 | String type to store left substring |
delim | Delimiter to find |
left | Set to substring before delim, set to this if not found [out] |
|
inline |
Split at first occurrence of delimiter into right substring.
T2 | String type to store right substring |
delim | Delimiter to find |
left | vNULL (ignored) |
right | Set to substring after delim, null if not found [out] |
|
inline |
Split delimited string into item list using given tokenizer.
Tok | Tokenizer to use, such as StrTok |
C | List container for items – inferred from items parameter |
items | List to add items to [in/out] |
delim | Delimiter to use |
|
inlineinherited |
Split into left/right sublists at index.
T1 | List type to store left sublist |
T2 | List type to store right sublist |
index | Index to split at, bad index (NONE or out-of-bounds) splits at end |
left | Set to sublist before index, set to this if bad index [out] |
right | Set to sublist after index, null if bad index [out] |
|
inlineinherited |
Split into left sublist at index.
T1 | List type to store left sublist |
index | Index to split at, bad index (NONE or out-of-bounds) splits at end |
left | Set to sublist before index, set to this if bad index [out] |
Split into right sublist at index.
T2 | List type to store right sublist |
index | Index to split at, bad index (NONE or out-of-bounds) splits at end |
left | vNULL (ignored) |
right | Set to sublist after index, null if bad index [out] |
|
inlineinherited |
Split at index and set as left sublist.
index | Index to split at, bad index (NONE or out-of-bounds) splits at end (i.e. unchanged) |
|
inlineinherited |
Split at index, set as left sublist, and save right sublist.
index | Index to split at, bad index (NONE or out-of-bounds) splits at end (i.e. unchanged) |
right | Set to sublist after index, null if bad index [out] |
|
inlineinherited |
|
inlineinherited |
Split at index, set as right sublist, and save left sublist.
index | Index to split at, bad index (NONE or out-of-bounds) splits at end |
left | Set to sublist before index, set to this if bad index [out] |
|
inline |
Split delimited string into map key/value items.
C | List container for items – inferred from map parameter |
map | List to add items to [in/out] |
delim | Item delimiter to use |
kvdelim | Key/Value delimiter to use |
|
inline |
Split at last occurrence of delimiter into left/right substrings.
T1 | String type to store left substring |
T2 | String type to store right substring |
delim | Delimiter to find |
left | Set to substring before delim, set to this if not found [out] |
right | Set to substring after delim, null if not found [out] |
|
inline |
Split at last occurrence of delimiter into left substring.
T1 | String type to store left substring |
delim | Delimiter to find |
left | Set to substring before delim, set to this if not found [out] |
|
inline |
Split at last occurrence of delimiter into right substring.
T2 | String type to store right substring |
delim | Delimiter to find |
left | vNULL (ignored) |
right | Set to substring after delim, null if not found [out] |
Check if starts with given items.
items | Items to check |
size | Size as item count to check |
|
inlineinherited |
Check if this starts with given items.
items | Items to check |
|
inline |
Check if this starts with given character.
ch | Character to check |
|
inline |
|
inline |
Strip left (beginning) and right (ending) occurences of character.
ch | Character to strip |
|
inline |
Strip left (beginning) and right (ending) whitespace from string, including newlines.
|
inline |
|
inline |
Strip left (beginning) occurrences of character.
ch | Character to strip |
max | Max count to strip, ALL for all |
Strip left (beginning) occurrences of string.
str | Pointer to string to strip |
strsize | String length to strip |
max | Max number of occurences to strip, ALL for all |
|
inline |
Strip left (beginning) whitespace from string, including newlines.
|
inline |
Strip left (beginning) newlines from string.
max
of 1 may remove 2 characters, and so onmax | Max number of newlines to strip, ALL for all |
|
inline |
Strip right (ending) occurences of character.
ch | Character to strip |
max | Max count to strip, ALL for all |
Strip right (ending) occurences of string.
str | Pointer to string to strip |
strsize | String length to strip |
max | Max number of occurences to strip, ALL for all |
|
inline |
Strip right (ending) whitespace (including newlines) from string.
|
inline |
Swap items.
index1 | Index of first item to swap |
index2 | Index of second item to swap |
|
inlineinherited |
Swap with another list.
list | List to swap with |
|
inline |
Extract next token from string.
StringT | Output string type to store line (String or SubString), inferred from first parameter |
value | Set to next token value, or null if none [out] |
delim | Delimiter to tokenize on |
Extract next token from string using any of given delimiters.
StringT | Output string type to store line (String or SubString), inferred from first parameter |
value | Set to next token value, or null if none [out] |
found_delim | Set to delimited found, null if no delim found [out] |
delims | Delimiters to search for |
count | Count of delimiters to search for, must be positive |
|
inline |
Extract next line from string.
StringT | Output string type to store line (String or SubString), inferred from parameter |
line | Set to extracted line (newline removed), null if no line extracted |
|
inline |
Extract next token from string in reverse (from end of string).
StringT | Output string type to store line (String or SubString), inferred from first parameter |
value | Set to next token value, or null if none [out] |
delim | Delimiter to tokenize on |
Extract next token from string in reverse (from end of string) using any of given delimiters.
StringT | Output string type to store line (String or SubString), inferred from first parameter |
value | Set to next token value, or null if none [out] |
found_delim | Set to delimited found, null if no delim found [out] |
delims | Delimiters to search for |
count | Count of delimiters to search for, must be positive |
|
inline |
Extract next line from string in reverse (from end of string).
StringT | Output string type to store line (String or SubString), inferred from parameter |
line | Set to extracted line (newline removed), null if no line extracted |
|
inline |
Convert all uppercase characters in string to lowercase (modifier).
|
inline |
Convert all lowercase characters in string to uppercase (modifier).
Trim left (beginning) items.
size | Trim size as item count to remove |
Trim left (beginning) items.
size | Trim size as item count to remove |
Trim right (ending) items.
size | Trim size as item count to remove |
Trim right (ending) items.
size | Trim size as item count to remove |
Truncate to given size.
size | Size to truncate to as item count |
Truncate to given size.
size | Size to truncate to as item count |
|
inline |
Make data unique by allocating new buffer, if needed (modifier).
|
inline |
Clean and remove hidden items previously removed via slicing (modifier).
|
inlinestatic |
Get string of ASCII whitespace characters (space, tab).
|
inline |
Get pointer for writing directly to buffer to append data.
size | Requred size in bytes to reserve |
|
inline |
Finish writing directly to buffer.
size | Size written in bytes, must not be greater than size passed to write_direct() |
Flush data written directly to buffer and get pointer for appending more.
reserve_size
is 0 then this does the same as write_direct_finish() and returns a non-NULL but invalid pointer on successavailable | Stores available size reserved in bytes, may be less than reserve_size , 0 if reserve_size was 0 [out] |
written_size | Size written in bytes to flush, must not be greater than available size from previous call to this or write_direct_multi() |
reserve_size | Requred size in bytes to reserve, 0 to finish |
Get pointer for writing directly to buffer to append data and allow multiple passes for larger sizes.
reserve_size
is 0 then this does nothing and returns a non-NULL but still invalid pointeravailable | Stores available size reserved in bytes, may be less than reserve_size , 0 if reserve_size was 0 [out] |
reserve_size | Requred size in bytes to reserve |
|
inline |
Get parent output string.
Write (append) to string.
buf | Data to write |
size | Size to write |
Write (append) repeat character as text output to string.
ch | Character to write |
count | Character count to write, must be positive |
|
inline |
Write (append) formatted and/or repeated character.
ch | Character to write |
count | Character repeat count to use |
field | Field attributes to use |
|
inline |
Write formatted data dump.
fmt | Format data, including buffer to dump |
newline | Newline string to use |
newlinesize | Size of newline string in bytes (max 2) |
|
inline |
Write (append) formatted signed number with field alignment.
TNum | Number type, inferred by param |
num | Number to write |
fmt | Integer formatting attributes to use |
field | Field formatting attributes to use, NULL for none |
|
inline |
Write (append) formatted floating point number with field alignment.
TNum | Number type, inferred by param |
num | Number to write |
fmt | Floating point formatting attributes to use |
field | Field formatting attributes to use, NULL for none |
|
inline |
Write (append) formatted unsigned number with field alignment.
TNum | Number type, inferred by param |
num | Number to write |
fmt | Integer formatting attributes to use |
field | Field formatting attributes to use, NULL for none |
|
inline |
Write (append) text with field alignment.
str | String buffer to write from |
size | Size to write in bytes |
field | Field attributes to use |
|
inline |
Write (append) formatted signed number.
TNum | Number type, inferred by param |
num | Number to write |
base | Base to use for formatting |
|
inline |
Write (append) formatted floating-point number.
TNum | Number type, inferred by param |
num | Number to write |
precision | Formatting precision (number of fractional digits), 0 for none, fPREC_AUTO for automatic |
|
inline |
Write (append) formatted unsigned number.
TNum | Number type, inferred by param |
num | Number to write |
base | Base to use for formatting |
Write (append) quoted output to string.
buf | Data to quote and write |
size | Data size to write |
delim | Delimiter for next field to escape via quoting |
optional | Whether quoting is optional, true to avoid quoting if possible |
Write (append) text output to string.
buf | Data to write |
size | Size to write |
|
protectedinherited |
List buffer.
|
inherited |
Data pointer, NULL if null.
|
inherited |
Data size as item count, 0 if empty or null.