Evo C++ Library v0.5.1
|
#include <evo/ustring.h>
Unicode string container using UTF-16.
C++11:
char8_t
, char16_t
Windows Only:
C++11 UTF-16 string literal (u
prefix) is supported.
Public Types | |
typedef void | EvoContainerType |
typedef wchar16 | Item |
Item type (same as Value) More... | |
typedef DataCopy< wchar16 >::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< wchar16, Size > | ListBaseType |
List base type for any Evo list More... | |
typedef List< wchar16, StrSizeT > | ListType |
List type More... | |
typedef StrSizeT | Size |
Size type. More... | |
typedef UnicodeString | ThisType |
This string type. More... | |
typedef wchar16 | Value |
Value type (same as Item) More... | |
Public Member Functions | |
UnicodeString () | |
Default constructor sets as null. More... | |
UnicodeString (const UnicodeString &str) | |
Copy constructor. More... | |
UnicodeString (const wchar16 *str, Size size) | |
Constructor for string pointer. More... | |
UnicodeString (const wchar16 *str) | |
Constructor for null terminated string. More... | |
UnicodeString (const StringBase &str) | |
Constructor to convert string from UTF-8. More... | |
UnicodeString (const char *str, Size size) | |
Constructor to convert string from UTF-8. More... | |
UnicodeString (const char *str) | |
Constructor to convert terminated string from UTF-8. More... | |
UnicodeString (const PtrBase< wchar16 > &str) | |
Constructor to copy null terminated string from managed pointer. More... | |
UnicodeString (UnicodeString &&src) | |
Move constructor (C++11). More... | |
UnicodeString (const char16_t *str, Size size) | |
Constructor for UTF-16 string pointer (C++11). More... | |
UnicodeString (const char16_t *str) | |
Constructor for UTF-16 string pointer (C++11). More... | |
UnicodeString & | add (const Item *data, Size size) |
Append new items copied from data pointer (modifier). More... | |
UnicodeString & | add (const ListBaseType &data) |
Append new items copied from another list (modifier). More... | |
UnicodeString & | add (const Item &data) |
Append new item (modifier). More... | |
ListType & | addmin (Size minsize) |
Append new items up to a given minimum size (modifier). More... | |
UnicodeString & | addnew (Size size=1) |
Append new items (modifier). More... | |
void | advAdd (Size size) |
Advanced: Append new items without initializing (constructing) them. More... | |
wchar16 * | advBuffer (Size size) |
Advanced: Resize and get buffer pointer (modifier). More... | |
wchar16 * | 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... | |
wchar16 * | advFirst () |
Advanced: Get first item (modifier). More... | |
Key | advInsert (Key index, Size size) |
Advanced: Insert new items without initializing (constructing) them. More... | |
wchar16 & | advItem (Key index) |
Advanced: Get item (mutable). More... | |
wchar16 * | 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... | |
UnicodeString & | 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... | |
wchar16 * | 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 ListType & | 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... | |
UnicodeString & | capacity (Size size) |
Set new capacity (modifier). More... | |
Size | capacity () const |
Get capacity. More... | |
UnicodeString & | capacitymax (Size max) |
Set maximum capacity (modifier). More... | |
UnicodeString & | 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... | |
UnicodeString & | clear () |
Clear by removing all items. More... | |
UnicodeString & | compact () |
Reduce capacity to fit current size (modifier). More... | |
int | compare (const ListBaseType &data) const |
Comparison. More... | |
int | compare (const StringBase &data) const |
Comparison against UTF-8 string. More... | |
bool | contains (ItemVal item) const |
Check whether contains given item. More... | |
bool | contains (const Item *data, Size size) const |
Check if contains given data. More... | |
bool | contains (const ListBaseType &data) const |
Check if contains given data. More... | |
UnicodeString & | copy (const WCHAR *str, Size size) |
Copy from terminated Windows WCHAR string pointer (Windows only). More... | |
UnicodeString & | copy (const WCHAR *str) |
Copy from Windows WCHAR string pointer (Windows only). More... | |
UnicodeString & | copy (const ListBaseType &str) |
Copy from base list type. More... | |
UnicodeString & | copy (const wchar16 *str, Size size) |
Copy from raw string pointer. More... | |
UnicodeString & | copy (const wchar16 *str) |
Copy from terminated raw string pointer. More... | |
const wchar16 * | cstr (UnicodeString &buffer) const |
Get terminated string pointer, using given string buffer if needed (const). More... | |
const wchar16 * | cstr () |
Get terminated string pointer (const). More... | |
const wchar16 * | cstrM () const |
Get terminated string pointer (modifier). More... | |
const wchar16 * | data () const |
Get string pointer (const). More... | |
wchar16 * | 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 (const). More... | |
bool | ends (ItemVal item) const |
Check if this ends with given item. 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... | |
UnicodeString & | fill (const Item &item, Key index=0, Size size=ALL) |
Fill using item (modifier). More... | |
Key | find (ItemVal item, Key start=0, Key end=END) const |
Find first occurrence of item with forward search. 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 | 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 | findr (ItemVal item, Key start=0, Key end=END) const |
Find last occurrence of item with reverse search. More... | |
const Item * | first () const |
Get first item (const). More... | |
Item * | firstM () |
Get first item (mutable). 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 | insertnew (Key index, Size size=1) |
Insert new items (modifier). More... | |
const Item & | item (Key index) const |
Get item at position (const). More... | |
wchar16 & | itemM (Key index) |
Get item at position (mutable). 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... | |
bool | operator!= (const UnicodeString &str) const |
Inequality operator. More... | |
bool | operator!= (const wchar16 *str) const |
Inequality operator. More... | |
bool | operator!= (const StringBase &str) const |
Inequality operator to compare against UTF-8 string. More... | |
bool | operator!= (const char *str) const |
Inequality operator to compare against terminated UTF-8 string. More... | |
bool | operator!= (const ListBaseType &data) const |
Inequality operator. More... | |
wchar16 & | operator() (Key index) |
Get item at position (mutable). More... | |
UnicodeString & | operator<< (const Item &data) |
Append operator. More... | |
UnicodeString & | operator<< (const ListBaseType &data) |
Append operator. More... | |
UnicodeString & | operator<< (const ValNull &val) |
Append operator to set as null and empty. More... | |
UnicodeString & | operator<< (const ValEmpty &val) |
Append operator to set as empty but not null. More... | |
UnicodeString & | operator= (UnicodeString &&src) |
Move assignment operator (C++11). More... | |
UnicodeString & | operator= (const char16_t *str) |
Assignment operator for terminated UTF-16 string pointer (C++11). More... | |
UnicodeString & | operator= (const UnicodeString &str) |
Assignment operator. More... | |
UnicodeString & | operator= (const ListBaseType &str) |
Assignment operator to copy from base list type. More... | |
UnicodeString & | operator= (const wchar16 *str) |
Assignment operator for terminated UTF-16 string. More... | |
UnicodeString & | operator= (const StringBase &str) |
Assignment operator to convert from UTF-8 string base type. More... | |
UnicodeString & | operator= (const char *str) |
Assignment operator to convert from terminated UTF-8 string. More... | |
UnicodeString & | operator= (const PtrBase< wchar16 > &str) |
ASsignment operator for null terminated string from managed pointer. More... | |
UnicodeString & | operator= (const WCHAR *str) |
Assignment operator for terminated Windows WCHAR string (Windows only). More... | |
bool | operator== (const UnicodeString &str) const |
Equality operator. More... | |
bool | operator== (const wchar16 *str) const |
Equality operator. More... | |
bool | operator== (const StringBase &str) const |
Equality operator to compare against UTF-8 string. More... | |
bool | operator== (const char *str) const |
Equality operator to compare against terminated UTF-8 string. More... | |
bool | operator== (const ListBaseType &data) const |
Equality operator. More... | |
const Item & | operator[] (Key index) const |
Get item at position (const). More... | |
bool | pop (wchar16 &item, Key index) |
Pop a copy of given item (modifier). More... | |
bool | pop (wchar16 &item) |
Pop a copy of last item (stack) (modifier). More... | |
const Item * | pop () |
Pop last item (stack). More... | |
bool | popq (wchar16 &item) |
Pop a copy of first item (queue) (modifier). More... | |
const Item * | popq () |
Pop first item (queue). More... | |
UnicodeString & | prepend (const Item *data, Size size) |
Prepend new items copied from data pointer (modifier). More... | |
UnicodeString & | prepend (const ListBaseType &data) |
Prepend new items copied from another list (modifier). More... | |
UnicodeString & | prepend (const Item &data) |
Prepend new item (modifier). More... | |
UnicodeString & | prependnew (Size size=1) |
Prepend new items (modifier). More... | |
Size | remove (Key index, Size size=1) |
Remove items (modifier). More... | |
UnicodeString & | replace (Key index, Size rsize, const Item *data, Size size) |
Replace items with new data (modifier). More... | |
UnicodeString & | reserve (Size size, bool prefer_realloc=false) |
Reserve capacity for additional items (modifier). More... | |
UnicodeString & | resize (Size size) |
Resize while preserving existing data (modifier). More... | |
UnicodeString & | set () |
Set as null and empty. More... | |
UnicodeString & | set (const ListType &str) |
Set to new string. More... | |
UnicodeString & | set (const ListBaseType &str) |
Set from base list type. More... | |
UnicodeString & | set (const wchar16 *str, Size size) |
Set from raw string pointer. More... | |
UnicodeString & | set (const wchar16 *str) |
Set from terminated raw string pointer. More... | |
UnicodeString & | set (const StringBase &str) |
Set and convert from UTF-8 string base type. More... | |
UnicodeString & | set (const char *str, Size size, UtfMode mode=umREPLACE_INVALID) |
Set and convert from UTF-8 string. More... | |
UnicodeString & | set (const char *str) |
Set and convert from terminated UTF-8 string. More... | |
UnicodeString & | set (const PtrBase< wchar16 > &str) |
Set to null terminated string from managed pointer. More... | |
UnicodeString & | set (const WCHAR *str, Size size) |
Set from Windows WCHAR string pointer (Windows only). More... | |
UnicodeString & | set (const WCHAR *str) |
Set from terminated Windows WCHAR string pointer (Windows only). 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... | |
UnicodeString & | set2 (const ListType &data, Key index1, Key index2) |
Set from subset of another list using start/end positions. More... | |
UnicodeString & | set2 (const ListBaseType &data, Key index1, Key index2) |
Set as copy of sublist using start/end positions. More... | |
ListType & | set2 (const ListType &data, Key index1, Key index2) |
Set from subset of another list using start/end positions. More... | |
UnicodeString & | set_win32 (const char *str, int size) |
Set as UTF-16 string converted from UTF-8 string (Windows only). More... | |
UnicodeString & | set_win32 (const char *str) |
Set as UTF-16 string converted from terminated UTF-8 string (Windows only). More... | |
UnicodeString & | setempty () |
Set as empty but not null. More... | |
bool | shared () const |
Get whether shared. More... | |
Size | size () const |
Get size. More... | |
UnicodeString & | slice (Key index) |
Slice beginning items. More... | |
UnicodeString & | slice (Key index, Size size) |
Slice to given sublist. More... | |
UnicodeString & | slice2 (Key index1, Key index2) |
Slice to given sublist using start/end positions. 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... | |
bool | starts (ItemVal item) const |
Check if this starts with given item. 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... | |
void | swap (Key index1, Key index2) |
Swap items. More... | |
void | swap (ListType &list) |
Swap with another list. More... | |
UnicodeString & | triml (Size size) |
Trim left (beginning) items. More... | |
UnicodeString & | trimr (Size size) |
Trim right (ending) items. More... | |
UnicodeString & | truncate (Size size=0) |
Truncate to given size. More... | |
UnicodeString & | unshare () |
Make data unique by allocating new buffer, if needed (modifier). More... | |
UnicodeString & | unslice () |
Clean and remove hidden items previously removed via slicing (modifier). More... | |
Public Attributes | |
wchar16 * | 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
typedef UnicodeString ThisType |
This string type.
|
inherited |
Value type (same as Item)
|
inline |
Default constructor sets as null.
|
inline |
|
inline |
Constructor for string pointer.
str | String pointer to use |
size | String size as wchar16 count |
|
inline |
Constructor for null terminated string.
str | String pointer, must be terminated, initialized as null if NULL |
|
inline |
Constructor to convert string from UTF-8.
str | String to convert |
|
inline |
Constructor to convert string from UTF-8.
str | String to convert |
size | String size in bytes |
|
inline |
Constructor to convert terminated string from UTF-8.
str | String to convert, must be terminated |
|
inline |
Constructor to copy null terminated string from managed pointer.
str | String pointer, must be terminated, initialized as null if NULL |
|
inline |
Move constructor (C++11).
src | Source to move |
|
inline |
Constructor for UTF-16 string pointer (C++11).
wchar16
is always 16 bitschar16_t
to be 16 bits, which is normally the case but the standard allows it to be largerassert()
to check char16_t
is 16 bitsstr | String pointer to use |
size | String size as wchar16 count |
|
inline |
Constructor for UTF-16 string pointer (C++11).
wchar16
is always 16 bitschar16_t
to be 16 bits, which is normally the case but the standard allows it to be largerassert()
to check char16_t
is 16 bitsstr | String pointer to use, must be terminated |
|
inline |
|
inline |
|
inline |
Append new items up to a given minimum size (modifier).
minsize | Minimum list size |
|
inline |
|
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 |
|
inline |
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 |
|
inlineinherited |
Explicitly use a const reference to this.
|
inlineinherited |
|
inlineinherited |
Get iterator at first item (const).
|
inline |
Set new capacity (modifier).
size | New capacity |
|
inlineinherited |
|
inline |
Set maximum capacity (modifier).
max | Maximum capacity |
|
inline |
Set minimum capacity (modifier).
min | Minimum capacity |
|
inlineinherited |
|
inlineinherited |
|
inline |
Clear by removing all items.
|
inline |
Reduce capacity to fit current size (modifier).
|
inline |
Comparison.
data | Data to compare to |
|
inline |
Comparison against UTF-8 string.
data | Data to compare to |
|
inlineinherited |
Check whether contains given item.
item | Item to check for |
Check if contains given data.
data | Data to check for |
size | Size as item count to check for |
|
inlineinherited |
Check if contains given data.
data | Data to check for |
|
inline |
Copy from terminated Windows WCHAR
string pointer (Windows only).
str | Pointer to string to copy from, NULL to set as null |
size | String size as character (WCHAR) count |
|
inline |
Copy from Windows WCHAR
string pointer (Windows only).
str | Pointer to string to copy from, must be terminated, NULL to set as null |
|
inline |
Copy from base list type.
str | String to copy from |
|
inline |
Copy from raw string pointer.
str | String to copy from |
size | String size as character (wchar16) count |
|
inline |
Copy from terminated raw string pointer.
str | String to copy from, must be terminated, NULL to set as null by calling set() |
|
inline |
Get terminated string pointer, using given string buffer if needed (const).
buffer | Buffer to use, if needed |
|
inline |
Get terminated string pointer (const).
|
inline |
Get terminated string pointer (modifier).
|
inline |
Get string pointer (const).
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get iterator at end (const).
|
inlineinherited |
Check if this ends with given item.
item | Item to check |
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 |
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 |
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 |
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 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 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 |
|
inlineinherited |
Get first item (const).
|
inlineinherited |
Get first item (mutable).
|
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 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 |
|
inlineinherited |
Get last item (const).
|
inlineinherited |
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 |
Inequality operator.
str | String to compare to |
|
inline |
Inequality operator.
str | String to compare to, must be terminated |
|
inline |
Inequality operator to compare against UTF-8 string.
str | String to compare to, must be terminated |
|
inline |
Inequality operator to compare against terminated UTF-8 string.
str | String to compare to, must be terminated |
|
inlineinherited |
Inequality operator.
data | Data to compare to |
|
inlineinherited |
Get item at position (mutable).
index | Item index |
|
inline |
Append operator.
data | Data to append |
|
inline |
Append operator.
data | Data to append |
|
inline |
Append operator to set as null and empty.
val | vNULL |
|
inline |
Append operator to set as empty but not null.
val | vEMPTY |
|
inline |
Move assignment operator (C++11).
src | Source to move |
|
inline |
Assignment operator for terminated UTF-16 string pointer (C++11).
wchar16
is always 16 bitschar16_t
to be 16 bits, which is normally the case but the standard allows it to be largerassert()
to check char16_t
is 16 bitsstr | String pointer to use, must be terminated |
|
inline |
Assignment operator.
str | String to copy |
|
inline |
Assignment operator to copy from base list type.
str | String data to assign |
|
inline |
Assignment operator for terminated UTF-16 string.
str | String pointer, must be terminated, calls set() if null |
|
inline |
Assignment operator to convert from UTF-8 string base type.
str | String str to convert from |
|
inline |
Assignment operator to convert from terminated UTF-8 string.
str | String str to convert from, must be terminated |
|
inline |
ASsignment operator for null terminated string from managed pointer.
str | String pointer, must be terminated, set to null if NULL |
|
inline |
Assignment operator for terminated Windows WCHAR
string (Windows only).
str | Pointer to string to set, must be terminated, NULL to set as null |
|
inline |
Equality operator.
str | String to compare to |
|
inline |
Equality operator.
str | String to compare to, must be terminated |
|
inline |
Equality operator to compare against UTF-8 string.
str | String to compare to, must be terminated |
|
inline |
Equality operator to compare against terminated UTF-8 string.
str | String to compare to, must be terminated |
|
inlineinherited |
Equality operator.
data | Data 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 |
|
inline |
|
inline |
Prepend new item (modifier).
data | Data to prepend |
|
inline |
|
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 |
|
inline |
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 |
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 |
|
inline |
Resize while preserving existing data (modifier).
size | New size as item count |
|
inline |
Set as null and empty.
|
inline |
Set to new string.
str | String to set from |
|
inline |
Set from base list type.
str | String to assign |
|
inline |
Set from raw string pointer.
str | String pointer to set from |
size | String size as character (wchar16) count |
|
inline |
Set from terminated raw string pointer.
str | String pointer to set from, must be terminated |
|
inline |
Set and convert from UTF-8 string base type.
str | String str to convert from |
|
inline |
Set and convert from UTF-8 string.
str | String str to convert from |
size | String size as character count |
mode | How to handle invalid UTF-8 bytes and values that convert to reserved UTF-16 surrogate values:
|
|
inline |
Set and convert from terminated UTF-8 string.
str | String str to convert from, must be terminated, NULL to call set() |
|
inline |
Set to null terminated string from managed pointer.
str | String pointer, must be terminated, set to null if NULL |
|
inline |
Set from Windows WCHAR
string pointer (Windows only).
str | Pointer to string to set, NULL to set as null |
size | String size as character (WCHAR) count |
|
inline |
Set from terminated Windows WCHAR
string pointer (Windows only).
str | Pointer to string to set, must be terminated, NULL to set as null |
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 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 |
|
inline |
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 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 |
|
inline |
Set as UTF-16 string converted from UTF-8 string (Windows only).
str | String to convert from, NULL to set as null by calling set() |
size | String size as character count |
|
inline |
Set as UTF-16 string converted from terminated UTF-8 string (Windows only).
str | String to convert from, must be terminated, NULL to set as null by calling set() |
|
inline |
Set as empty but not null.
|
inlineinherited |
Get whether shared.
|
inlineinherited |
Get size.
|
inline |
Slice beginning items.
index | Start index of new slice, END to slice (remove) all items from beginning |
|
inline |
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 |
|
inline |
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 |
|
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] |
|
inlineinherited |
Check if this starts with given item.
item | Item to check |
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 |
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 |
Trim left (beginning) items.
size | Trim size as item count to remove |
|
inline |
Trim right (ending) items.
size | Trim size as item count to remove |
|
inline |
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).
|
protectedinherited |
List buffer.
|
inherited |
Data pointer, NULL if null.
|
inherited |
Data size as item count, 0 if empty or null.