ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
![]() ![]() |
#include <string.h>
Classes | |
class | cstring |
class | regex |
Public Types | |
enum | { SENSITIVE = 0x00, INSENSITIVE = 0x01 } |
Public Member Functions | |
virtual int | compare (const char *string) const |
String () | |
String (size_t size) | |
String (size_t size, const char *format,...) | |
String (const char *text) | |
String (const char *text, size_t size) | |
String (const char *text, const char *end) | |
String (const String &existing) | |
virtual | ~String () |
String | get (size_t offset, size_t size=0) const |
int | scanf (const char *format,...) __SCANF(2 |
int int | vscanf (const char *format, va_list args) __SCANF(2 |
int int size_t | printf (const char *format,...) __PRINTF(2 |
int int size_t size_t | vprintf (const char *format, va_list args) __PRINTF(2 |
int int size_t size_t char * | data (void) |
char * | c_mem () |
const char * | c_str (void) const |
virtual bool | resize (size_t size) |
void | set (const char *text) |
void | set (size_t offset, const char *text, size_t size=0) |
void | set (const char *text, char overflow, size_t offset, size_t size=0) |
void | rset (const char *text, char overflow, size_t offset, size_t size=0) |
void | add (const char *text) |
void | add (char character) |
void | trim (const char *list) |
void | trim (size_t count=1) |
void | chop (const char *list) |
void | chop (size_t count=1) |
void | strip (const char *list) |
bool | unquote (const char *quote) |
void | cut (size_t offset, size_t size=0) |
void | paste (size_t offset, const char *text, size_t size=0) |
void | clear (size_t offset) |
void | clear (void) |
void | upper (void) |
void | lower (void) |
void | erase (void) |
size_t | ccount (const char *list) const |
size_t | count (void) const |
size_t | size (void) const |
size_t | offset (const char *pointer) const |
char | at (int position) const |
const char * | begin (void) const |
const char * | end (void) const |
const char * | skip (const char *list, size_t offset=0) const |
const char * | rskip (const char *list, size_t offset=npos) const |
const char * | search (const char *string, unsigned instance=0, unsigned flags=0) const |
const char * | search (regex &expr, unsigned instance=0, unsigned flags=0) const |
unsigned | replace (const char *string, const char *text=NULL, unsigned flags=0) |
unsigned | replace (regex &expr, const char *text=NULL, unsigned flags=0) |
const char * | find (const char *list, size_t offset=0) const |
const char * | rfind (const char *list, size_t offset=npos) const |
void | split (const char *pointer) |
void | split (size_t offset) |
void | fill (size_t size, char fill) |
void | rsplit (const char *pointer) |
void | rsplit (size_t offset) |
const char * | chr (char character) const |
const char * | rchr (char character) const |
size_t | len (void) const |
operator const char * () const | |
const char * | operator* () const |
bool | full (void) const |
String | operator() (int offset, size_t size) const |
String | left (size_t size) const |
String | right (size_t offset) const |
String | copy (size_t offset, size_t size) const |
const char * | operator() (int offset) const |
const char | operator[] (int offset) const |
bool | operator! () const |
operator bool () const | |
String & | operator^= (const String &object) |
String & | operator|= (const char *text) |
String & | operator&= (const char *text) |
String & | operator+= (const char *text) |
String & | operator^= (const char *text) |
const String | operator+ (const char *text) const |
String & | operator| (const char *text) |
String & | operator& (const char *text) |
String & | operator= (const String &object) |
bool | operator*= (const char *substring) |
bool | operator*= (regex &expr) |
String & | operator= (const char *text) |
String & | operator++ (void) |
String & | operator+= (size_t number) |
String & | operator-- (void) |
String & | operator-= (size_t number) |
String & | operator*= (size_t number) |
bool | operator== (const char *text) const |
bool | operator!= (const char *text) const |
bool | operator< (const char *text) const |
bool | operator<= (const char *text) const |
bool | operator> (const char *text) const |
bool | operator>= (const char *text) const |
String & | operator<< (const char *text) |
String & | operator<< (char code) |
String & | operator% (short &value) |
String & | operator% (unsigned short &value) |
String & | operator% (long &value) |
String & | operator% (unsigned long &value) |
String & | operator% (double &value) |
String & | operator% (const char *text) |
char * | token (char **last, const char *list, const char *quote=NULL, const char *end=NULL) |
double | tod (char **pointer=NULL) |
long | tol (char **pointer=NULL) |
Static Public Member Functions | |
static void | swap (String &object1, String &object2) |
static void | fix (String &object) |
static bool | check (const char *string, size_t maximum, size_t minimum=0) |
static void | erase (char *text) |
static void | lower (char *text) |
static void | upper (char *text) |
static char * | token (char *text, char **last, const char *list, const char *quote=NULL, const char *end=NULL) |
static char * | skip (char *text, const char *list) |
static char * | rskip (char *text, const char *list) |
static char * | unquote (char *text, const char *quote) |
static char * | rset (char *buffer, size_t size, const char *text) |
static char * | set (char *buffer, size_t size, const char *text) |
static char * | set (char *buffer, size_t size, const char *text, size_t max) |
static char * | add (char *buffer, size_t size, const char *text) |
static char * | add (char *buffer, size_t size, const char *text, size_t max) |
static const char * | ifind (const char *text, const char *key, const char *optional) |
static const char * | find (const char *text, const char *key, const char *optional) |
static size_t | count (const char *text) |
static int | compare (const char *text1, const char *text2) |
static int | collate (const char *text1, const char *text2) |
static bool | equal (const char *text1, const char *text2) |
static int | compare (const char *text1, const char *text2, size_t size) |
static bool | equal (const char *text1, const char *text2, size_t size) |
static bool | eq_case (const char *text1, const char *text2) |
static bool | eq_case (const char *text1, const char *text2, size_t size) |
static char * | trim (char *text, const char *list) |
static char * | chop (char *text, const char *list) |
static char * | strip (char *text, const char *list) |
static char * | fill (char *text, size_t size, char character) |
static unsigned | ccount (const char *text, const char *list) |
static char * | find (char *text, const char *list) |
static size_t | seek (char *text, const char *list) |
static char * | rfind (char *text, const char *list) |
static char * | dup (const char *text) |
static char * | left (const char *text, size_t size) |
static const char * | pos (const char *text, ssize_t offset) |
static char * | right (const char *text, size_t size) |
static char * | copy (const char *text, size_t offset, size_t len) |
static void | cut (char *text, size_t offset, size_t len) |
static void | paste (char *text, size_t max, size_t offset, const char *data, size_t len=0) |
static double | tod (const char *text, char **pointer=NULL) |
static long | tol (const char *text, char **pointer=NULL) |
static String | b64 (const uint8_t *binary, size_t size) |
static size_t | b64size (size_t size) |
static size_t | b64encode (char *string, const uint8_t *binary, size_t size, size_t width=0) |
static size_t | b64decode (uint8_t *binary, const char *string, size_t size, bool ws=false) |
static size_t | b64count (const char *str, bool ws=false) |
static uint32_t | crc24 (uint8_t *binary, size_t size) |
static uint16_t | crc16 (uint8_t *binary, size_t size) |
static String | hex (const uint8_t *binary, size_t size) |
static size_t | hexdump (const uint8_t *binary, char *string, const char *format) |
static size_t | hexpack (uint8_t *binary, const char *string, const char *format) |
static size_t | hex2bin (const char *string, uint8_t *binary, size_t maxsize, bool wsflag=false) |
static size_t | hexsize (const char *format) |
static size_t | hexcount (const char *str, bool ws=false) |
Static Public Attributes | |
const static size_t | npos = ((size_t)-1) |
const static char | eos = '\0' |
Protected Member Functions | |
cstring * | create (size_t size) const |
bool | equal (const char *string) const |
virtual void | retain (void) __OVERRIDE |
virtual void | release (void) __OVERRIDE |
virtual cstring * | c_copy (void) const |
virtual void | cow (size_t size=0) |
size_t | getStringSize (void) const |
Protected Attributes | |
cstring * | str |
A copy-on-write string class that operates by reference count. This string class anchors a counted object that is managed as a copy-on-write instance of the string data. This means that multiple instances of the string class can refer to the same string in memory if it has not been modifed, which reduces heap allocation. The string class offers functions to manipulate both the string object, and generic safe string functions to manipulate ordinary null terminated character arrays directly in memory.
anonymous enum |
This is an internal class which contains the actual string data along with some control fields. The string can be either NULL terminated or filled like a Pascal-style string, but with a user selected fill character. The cstring object is an overdraft object, as the actual string text which is of unknown size follows immediately after the class control data. This class is primarily for internal use.
Enumerator | |
---|---|
SENSITIVE | |
INSENSITIVE |
ucommon::String::String | ( | ) |
Create a new empty string object.
Definition at line 169 of file string.cpp.
References str.
Referenced by get(), and operator()().
ucommon::String::String | ( | size_t | size | ) |
Create an empty string with a buffer pre-allocated to a specified size.
size | of buffer to allocate. |
Definition at line 210 of file string.cpp.
References create(), ucommon::CountedObject::retain(), size(), and str.
ucommon::String::String | ( | size_t | size, |
const char * | format, | ||
... | |||
) |
Create a string by printf-like formating into a pre-allocated space of a specified size. A typical use might be in a concat function like String x = (String)something + (String){10, "%ud", var}.
size | of buffer to allocate. |
format | control for string. |
Definition at line 216 of file string.cpp.
References create(), ucommon::CountedObject::retain(), size(), str, and ucommon::String::cstring::text.
ucommon::String::String | ( | const char * | text | ) |
Create a string from null terminated text.
text | to use for string. |
Definition at line 189 of file string.cpp.
References count(), create(), ucommon::CountedObject::retain(), ucommon::String::cstring::set(), size(), and str.
ucommon::String::String | ( | const char * | text, |
size_t | size | ||
) |
Create a string from null terminated text up to a maximum specified size.
text | to use for string. |
size | limit of new string. |
Definition at line 199 of file string.cpp.
References create(), ucommon::CountedObject::retain(), ucommon::String::cstring::set(), size(), and str.
ucommon::String::String | ( | const char * | text, |
const char * | end | ||
) |
Create a string for a substring. The end of the substring is a pointer within the substring itself.
text | to use for string. |
end | of text in substring. |
Definition at line 174 of file string.cpp.
References create(), end(), ucommon::CountedObject::retain(), ucommon::String::cstring::set(), size(), and str.
ucommon::String::String | ( | const String & | existing | ) |
Construct a copy of a string object. Our copy inherets the same reference counted instance of cstring as in the original.
existing | string to copy from. |
Definition at line 229 of file string.cpp.
References dup(), ucommon::CountedObject::retain(), and str.
|
virtual |
Destroy string. De-reference cstring. If last reference to cstring, then also remove cstring from heap.
Definition at line 236 of file string.cpp.
References release().
|
static |
Safely append a null terminated string into an existing string in memory. If the resulting string is too large to fit into the buffer, it is truncated to the size.
buffer | to set. |
size | of buffer. Includes null byte at end of string. |
text | to set in buffer. |
Definition at line 1591 of file string.cpp.
|
static |
Safely append a null terminated string into an existing string in memory. If the resulting string is too large to fit into the buffer, it is truncated to the size.
buffer | to set. |
size | of buffer. Includes null byte at end of string. |
text | to set in buffer. |
max | size of text to append. |
Definition at line 1574 of file string.cpp.
void ucommon::String::add | ( | char | character | ) |
Append a single character to our string buffer.
character | to append. |
Definition at line 973 of file string.cpp.
References ucommon::String::cstring::add(), ch, cow(), set(), and str.
void ucommon::String::add | ( | const char * | text | ) |
Append null terminated text to our string buffer.
text | to append. |
Definition at line 992 of file string.cpp.
References ucommon::String::cstring::add(), cow(), set(), and str.
Referenced by ost::addString(), operator&(), operator+(), operator+=(), ucommon::charbuf< S >::operator+=(), ucommon::cidr::set(), ucommon::shell::set0(), and ucommon::StringPager::split().
char ucommon::String::at | ( | int | position | ) | const |
Return character found at a specific position in the string.
position | in string, negative values computed from end. |
Definition at line 1006 of file string.cpp.
References ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
|
static |
Standard radix 64 string encoding.
binary | data to encode. |
size | of binary data to encode. |
Definition at line 2117 of file string.cpp.
References b64encode(), out, and size().
Referenced by ucommon::typeref< const uint8_t * >::b64().
|
static |
Definition at line 2180 of file string.cpp.
References ucommon::alphabet, count(), and decoder.
Referenced by ucommon::typeref< const uint8_t * >::b64().
|
static |
Standard radix 64 decoding.
binary | data to save. |
string | of encoded text. |
size | of destination buffer. |
ws | flag to skip whitespaces. |
Definition at line 2226 of file string.cpp.
References ucommon::alphabet, count(), decoder, and size().
Referenced by ucommon::Cipher::Key::b64(), ucommon::typeref< const uint8_t * >::b64(), and streamdecode().
|
static |
Standard radix 64 encoding.
string | of encoded text save into. |
binary | data to encode. |
size | of binary data to encode. |
width | of string buffer for data if partial supported. |
Definition at line 2126 of file string.cpp.
References ucommon::alphabet, b64size(), count(), end(), and size().
Referenced by ucommon::typeref< const char * >::b64(), b64(), encode(), and encodefile().
|
static |
Definition at line 2175 of file string.cpp.
References size().
Referenced by ucommon::typeref< const char * >::b64(), and b64encode().
const char * ucommon::String::begin | ( | void | ) | const |
Get pointer to first character in string for iteration.
Definition at line 331 of file string.cpp.
References str, and ucommon::String::cstring::text.
|
protectedvirtual |
Return cstring to use in copy constructors. Is virtual for memstring.
Reimplemented in ucommon::memstring.
Definition at line 241 of file string.cpp.
References str.
const char * ucommon::String::c_str | ( | void | ) | const |
Get character text buffer of string object.
Definition at line 289 of file string.cpp.
References str, and ucommon::String::cstring::text.
Referenced by ucommon::_stream_operators::append(), ucommon::stringbuf< S >::operator=(), operator^=(), ucommon::_stream_operators::print(), and ost::PersistEngine::write().
size_t ucommon::String::ccount | ( | const char * | list | ) | const |
Count number of occurrences of characters in string.
list | of characters to find. |
Definition at line 625 of file string.cpp.
References str, and ucommon::String::cstring::text.
|
static |
Count instances of characters in a list in a text buffer.
text | buffer to examine. |
list | of characters to count in buffer. |
Definition at line 1684 of file string.cpp.
|
static |
Check if string is valid and in specific constraints.
string | to check. |
maximum | size allowed. |
minimum | size required. |
Definition at line 1643 of file string.cpp.
References count(), ucommon::max(), ucommon::min(), and str.
|
static |
Strip trailing characters from the text string. This function will modify memory.
text | buffer to examine. |
list | of characters to chop from trailing end of string. |
Definition at line 1622 of file string.cpp.
void ucommon::String::chop | ( | const char * | list | ) |
Chop trailing characters from the string.
list | of characters to remove. |
Definition at line 416 of file string.cpp.
References clear(), ucommon::String::cstring::fix(), ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
Referenced by ucommon::keyfile::load(), and strip().
|
inline |
const char * ucommon::String::chr | ( | char | character | ) | const |
Find pointer in string where specified character appears.
character | to find. |
Definition at line 347 of file string.cpp.
References ch, str, and ucommon::String::cstring::text.
void ucommon::String::clear | ( | size_t | offset | ) |
Clear a field of a filled string with filler.
offset | to start of field to clear. |
Definition at line 933 of file string.cpp.
References ucommon::String::cstring::clear(), offset(), and str.
Referenced by ucommon::Socket::readline().
void ucommon::String::clear | ( | void | ) |
Clear string by setting to empty.
Definition at line 941 of file string.cpp.
References ucommon::String::cstring::set(), and str.
|
inlinestatic |
Definition at line 1099 of file string.h.
Referenced by ucommon::ncompare().
|
virtual |
Compare the values of two string. This is a virtual so that it can be overridden for example if we want to create strings which ignore case, or which have special ordering rules.
string | to compare with. |
Definition at line 314 of file string.cpp.
References str, and ucommon::String::cstring::text.
Referenced by ucommon::eq(), equal(), ucommon::ge(), ucommon::gt(), ucommon::le(), ucommon::lt(), ucommon::ne(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
static |
Safe string collation function.
text1 | to compare. |
text2 | to compare. |
Definition at line 1822 of file string.cpp.
|
static |
Depreciated string comparison function.
text1 | to compare. |
text2 | to compare. |
size | limit of strings to compare. |
|
inlinestatic |
|
inline |
|
static |
Safe version of strlen function. Accepts NULL as 0 length strings.
text | string. |
Definition at line 1444 of file string.cpp.
size_t ucommon::String::count | ( | void | ) | const |
Count all characters in the string (strlen).
Definition at line 618 of file string.cpp.
References ucommon::String::cstring::len, and str.
Referenced by ucommon::_stream_operators::append(), b64count(), b64decode(), b64encode(), ccount(), check(), hex2bin(), hexcount(), hexdump(), hexpack(), hexsize(), ucommon::String::regex::match(), ucommon::String::regex::offset(), ucommon::temporary< char * >::read(), ucommon::String::regex::regex(), replace(), rset(), rskip(), set(), ucommon::String::regex::size(), ucommon::StringPager::split(), String(), and unquote().
|
protectedvirtual |
Copy on write operation for cstring. This always creates a new unique copy for write/modify operations and is a virtual for memstring to disable.
size | to add to allocated space when creating new cstring. |
Reimplemented in ucommon::memstring.
Definition at line 947 of file string.cpp.
References create(), ucommon::CountedObject::is_copied(), ucommon::String::cstring::len, ucommon::String::cstring::max, ucommon::CountedObject::release(), ucommon::CountedObject::retain(), set(), size(), str, and ucommon::String::cstring::text.
|
static |
ccitt 16 bit crc for binary data.
binary | data to sum. |
size | of binary data to sum. |
Definition at line 2307 of file string.cpp.
|
static |
24 bit crc as used in openpgp.
binary | data to sum. |
size | of binary data to sum. |
Definition at line 2291 of file string.cpp.
References binary, CRC24_INIT, CRC24_POLY, and size().
|
protected |
Factory create a cstring object of specified size.
size | of allocated space for string buffer. |
Definition at line 256 of file string.cpp.
References size().
Referenced by ucommon::memstring::c_copy(), cow(), fill(), paste(), resize(), ucommon::UString::set(), set(), String(), and ucommon::UString::UString().
|
static |
Definition at line 894 of file string.cpp.
void ucommon::String::cut | ( | size_t | offset, |
size_t | size = 0 |
||
) |
Cut (remove) text from string.
offset | to start of text field to remove. |
size | of text field to remove or 0 to remove to end of string. |
Definition at line 849 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, offset(), size(), str, and ucommon::String::cstring::text.
Referenced by ucommon::UString::cut(), and replace().
char * ucommon::String::data | ( | void | ) |
Get memory text buffer of string object.
Definition at line 281 of file string.cpp.
References str, and ucommon::String::cstring::text.
Referenced by ucommon::_stream_operators::input(), ucommon::Socket::readline(), and ucommon::str().
|
static |
Duplicate null terminated text into the heap.
text | to duplicate. |
Definition at line 1390 of file string.cpp.
References __THROW_ALLOC, len(), and set().
Referenced by ucommon::StringPager::split(), and String().
const char * ucommon::String::end | ( | void | ) | const |
Get pointer to last character in string for iteration.
Definition at line 339 of file string.cpp.
References ucommon::String::cstring::len, str, and ucommon::String::cstring::text.
Referenced by b64encode(), ucommon::UString::get(), and String().
|
static |
Simple case insensitive equal test for strings.
text1 | to test. |
text2 | to test. |
Definition at line 1772 of file string.cpp.
References stricmp().
Referenced by ucommon::eq_case(), and ucommon::ne_case().
|
static |
Simple case insensitive equal test for strings.
text1 | to test. |
text2 | to test. |
size | limit of strings to compare. |
Definition at line 1787 of file string.cpp.
References size(), and strnicmp().
|
protected |
Test if two string values are equal.
string | to compare with. |
Definition at line 297 of file string.cpp.
References compare(), str, and ucommon::String::cstring::text.
Referenced by ucommon::eq(), and ucommon::ne().
|
static |
Simple equal test for strings.
text1 | to test. |
text2 | to test. |
Definition at line 1802 of file string.cpp.
|
static |
Simple equal test for strings.
text1 | to test. |
text2 | to test. |
size | limit of strings to compare. |
Definition at line 1812 of file string.cpp.
References size().
|
static |
Erase string memory. Often used to clear out passwords.
text | string to erase. |
Definition at line 1676 of file string.cpp.
References str.
void ucommon::String::erase | ( | void | ) |
Erase string memory.
Definition at line 596 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::max, str, and ucommon::String::cstring::text.
|
static |
Fill a section of memory with a fixed text character. Adds a null byte at the end.
text | buffer to fill. |
size | of text buffer with null terminated byte. |
character | to fill with. |
Definition at line 1855 of file string.cpp.
void ucommon::String::fill | ( | size_t | size, |
char | fill | ||
) |
Definition at line 735 of file string.cpp.
References create(), ucommon::String::cstring::fix(), ucommon::String::cstring::len, ucommon::String::cstring::max, ucommon::CountedObject::retain(), size(), str, and ucommon::String::cstring::text.
Referenced by fill().
|
static |
Find the first occurrence of a character in a text buffer.
text | buffer to examine. |
list | of characters to search for. |
Definition at line 1740 of file string.cpp.
References str.
const char * ucommon::String::find | ( | const char * | list, |
size_t | offset = 0 |
||
) | const |
Find a character in the string.
list | of characters to search for. |
offset | to start of search. |
Definition at line 552 of file string.cpp.
References ucommon::String::cstring::len, len(), offset(), str, and ucommon::String::cstring::text.
Referenced by main().
|
static |
Find position of substring within a string.
text | to search in. |
key | string to locate. |
optional | separator chars if formatted as list of keys. |
Definition at line 1452 of file string.cpp.
|
static |
Fix and reset string object filler.
object | to fix. |
Definition at line 1375 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, str, and ucommon::String::cstring::text.
Referenced by ucommon::String::cstring::add(), ucommon::String::cstring::dec(), ucommon::String::cstring::inc(), ucommon::Socket::readline(), ucommon::String::cstring::set(), and ucommon::str().
bool ucommon::String::full | ( | void | ) | const |
Test if the string's allocated space is all used up.
Definition at line 1153 of file string.cpp.
References ucommon::String::cstring::len, ucommon::String::cstring::max, and str.
String ucommon::String::get | ( | size_t | offset, |
size_t | size = 0 |
||
) | const |
Get a new string object as a substring of the current object.
offset | of substring. |
size | of substring or 0 if to end. |
Definition at line 246 of file string.cpp.
References ucommon::String::cstring::len, len(), offset(), str, String(), and ucommon::String::cstring::text.
Referenced by operator%().
|
protected |
|
static |
Convert binary data buffer into hex string.
binary | data to convert. |
size | of data. |
Definition at line 1913 of file string.cpp.
References binary, out, and size().
Referenced by ucommon::typeref< const uint8_t * >::hex().
|
static |
Definition at line 1949 of file string.cpp.
References count(), ucommon::hexcode(), ucommon::max(), out, and str.
Referenced by ucommon::typeref< const uint8_t * >::hex().
|
static |
Definition at line 1875 of file string.cpp.
References count(), ucommon::hexcode(), and str.
Referenced by ucommon::typeref< const uint8_t * >::hex().
|
static |
Dump hex data to a string buffer.
binary | memory to dump. |
string | to save into. |
format | string to convert with. |
Definition at line 1924 of file string.cpp.
References binary, count(), and skip().
Referenced by ucommon::secure::uuid(), ucommon::Digest::uuid(), and ucommon::Random::uuid().
|
static |
Pack hex data from a string buffer.
binary | memory to pack. |
string | to save into. |
format | string to convert with. |
whitespace | flag to ignore. |
Definition at line 1973 of file string.cpp.
References binary, count(), ucommon::hexcode(), and skip().
|
static |
Definition at line 1893 of file string.cpp.
|
static |
Find position of case insensitive substring within a string.
text | to search in. |
key | string to locate. |
optional | separator chars if formatted as list of keys. |
Definition at line 1482 of file string.cpp.
References delim, str, and strnicmp().
|
static |
Duplicate null terminated text of specific size to heap.
text | to duplicate. |
size | of text, maximum space allocated. |
Definition at line 1405 of file string.cpp.
References __THROW_ALLOC, set(), and size().
|
inline |
size_t ucommon::String::len | ( | void | ) | const |
Get length of string.
Definition at line 145 of file string.cpp.
References ucommon::String::cstring::len, and str.
Referenced by ucommon::String::cstring::add(), ucommon::String::cstring::clear(), cut(), ucommon::String::cstring::dec(), dup(), find(), ucommon::String::cstring::fix(), get(), ucommon::String::cstring::inc(), operator%(), operator()(), paste(), pos(), ucommon::_stream_operators::print(), printf(), rset(), rskip(), ucommon::String::cstring::set(), set(), skip(), trim(), unquote(), and vprintf().
|
static |
Convert null terminated text to lower case.
text | to convert. |
Definition at line 1668 of file string.cpp.
References str.
void ucommon::String::lower | ( | void | ) |
Convert string to lower case.
Definition at line 590 of file string.cpp.
References str, and ucommon::String::cstring::text.
size_t ucommon::String::offset | ( | const char * | pointer | ) | const |
Find offset of a pointer into our string buffer. This can be used to find the offset position of a pointer returned by find, for example. This is used when one needs to convert a member function that returns a pointer to call a member function that operates by a offset value. If the pointer is outside the range of the string then npos is returned.
pointer | into our object's string buffer. |
Definition at line 604 of file string.cpp.
References ucommon::String::cstring::len, ucommon::String::cstring::max, npos, str, and ucommon::String::cstring::text.
Referenced by ucommon::UString::at(), at(), chop(), ucommon::String::cstring::clear(), clear(), ucommon::UString::cut(), cut(), ucommon::String::cstring::dec(), find(), get(), ucommon::String::cstring::inc(), ucommon::UString::operator()(), operator()(), operator+=(), operator-=(), operator[](), ucommon::UString::paste(), paste(), pos(), replace(), rfind(), rset(), rskip(), ucommon::String::cstring::set(), set(), skip(), and trim().
ucommon::String::operator bool | ( | ) | const |
Test if string has data.
Definition at line 1177 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, and str.
|
inline |
bool ucommon::String::operator! | ( | void | ) | const |
Test if string is empty.
Definition at line 1164 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, and str.
bool ucommon::String::operator!= | ( | const char * | text | ) | const |
Compare our object with null terminated text. Compare method is used.
text | to compare with. |
Definition at line 1195 of file string.cpp.
References compare().
String & ucommon::String::operator% | ( | const char * | text | ) |
Parse text from a string in a scan expression.
text | to scan and bypass. |
Definition at line 2095 of file string.cpp.
References ucommon::eq(), get(), len(), set(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator% | ( | double & | value | ) |
Parse double value from a string.
value | to store. |
Definition at line 2079 of file string.cpp.
References set(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator% | ( | long & | value | ) |
Parse long integer value from a string.
value | to store. |
Definition at line 2047 of file string.cpp.
References set(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator% | ( | short & | value | ) |
Parse short integer value from a string.
value | to store. |
Definition at line 2021 of file string.cpp.
References set(), str, temp, and ucommon::String::cstring::text.
String & ucommon::String::operator% | ( | unsigned long & | value | ) |
Parse long integer value from a string.
value | to store. |
Definition at line 2063 of file string.cpp.
References set(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator% | ( | unsigned short & | value | ) |
Parse short integer value from a string.
value | to store. |
Definition at line 1998 of file string.cpp.
References set(), str, temp, and ucommon::String::cstring::text.
String & ucommon::String::operator& | ( | const char * | text | ) |
Concatenate null terminated text to our object. This directly appends the text to the string buffer and does not resize the object if the existing cstring allocation space is fully used.
text | to concatenate. |
Definition at line 1220 of file string.cpp.
References add().
String & ucommon::String::operator&= | ( | const char * | text | ) |
Definition at line 1125 of file string.cpp.
References set().
const char * ucommon::String::operator() | ( | int | offset | ) | const |
Reference a string in the object by relative offset. Positive offsets are from the start of the string, negative from the end.
offset | to string position. |
Definition at line 1035 of file string.cpp.
References ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
String ucommon::String::operator() | ( | int | offset, |
size_t | size | ||
) | const |
Get a new substring through object expression.
offset | of substring. |
size | of substring or 0 if to end. |
Definition at line 1023 of file string.cpp.
|
inline |
bool ucommon::String::operator*= | ( | const char * | substring | ) |
Definition at line 1097 of file string.cpp.
References search().
bool ucommon::String::operator*= | ( | regex & | expr | ) |
String& ucommon::String::operator*= | ( | size_t | number | ) |
Delete a specified number of characters from start of string.
number | of characters to delete. |
const String ucommon::String::operator+ | ( | const char * | text | ) | const |
Concatenate null terminated text to our object.
text | to concatenate. |
Definition at line 1240 of file string.cpp.
References add(), set(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator++ | ( | void | ) |
Delete first character from string.
Definition at line 1069 of file string.cpp.
References ucommon::String::cstring::inc(), and str.
String & ucommon::String::operator+= | ( | const char * | text | ) |
Concatenate text to an existing string object.
text | to add. |
Definition at line 1252 of file string.cpp.
References add().
String & ucommon::String::operator+= | ( | size_t | number | ) |
Delete a specified number of characters from start of string.
number | of characters to delete. |
Definition at line 1083 of file string.cpp.
References ucommon::String::cstring::inc(), offset(), and str.
String & ucommon::String::operator-- | ( | void | ) |
Delete last character from string.
Definition at line 1076 of file string.cpp.
References ucommon::String::cstring::dec(), and str.
String & ucommon::String::operator-= | ( | size_t | number | ) |
Delete a specified number of characters from end of string.
number | of characters to delete. |
Definition at line 1090 of file string.cpp.
References ucommon::String::cstring::dec(), offset(), and str.
bool ucommon::String::operator< | ( | const char * | text | ) | const |
Compare our object with null terminated text. Compare method is used.
text | to compare with. |
Definition at line 1200 of file string.cpp.
References compare().
|
inline |
bool ucommon::String::operator<= | ( | const char * | text | ) | const |
Compare our object with null terminated text. Compare method is used.
text | to compare with. |
Definition at line 1205 of file string.cpp.
References compare().
String & ucommon::String::operator= | ( | const char * | text | ) |
Assign text to our existing buffer. This performs a set method.
text | to assign from. |
Definition at line 1112 of file string.cpp.
Assign our string with the cstring of another object. If we had an active string reference, it is released. The object now has a duplicate reference to the cstring of the other object.
object | to assign from. |
Definition at line 1138 of file string.cpp.
References ucommon::CountedObject::release(), ucommon::CountedObject::retain(), and str.
bool ucommon::String::operator== | ( | const char * | text | ) | const |
Compare our object with null terminated text.
text | to compare with. |
Definition at line 1190 of file string.cpp.
References compare().
bool ucommon::String::operator> | ( | const char * | text | ) | const |
Compare our object with null terminated text. Compare method is used.
text | to compare with. |
Definition at line 1210 of file string.cpp.
References compare().
bool ucommon::String::operator>= | ( | const char * | text | ) | const |
Compare our object with null terminated text. Compare method is used.
text | to compare with. |
Definition at line 1215 of file string.cpp.
References compare().
const char ucommon::String::operator[] | ( | int | offset | ) | const |
Reference a single character in string object by array offset.
offset | to character. |
Definition at line 1052 of file string.cpp.
References ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
String & ucommon::String::operator^= | ( | const char * | text | ) |
Create new cow instance and assign value from null terminated text.
text | to assign from. |
Definition at line 1105 of file string.cpp.
Create new cow instance and assign value from another string object.
object | to assign from. |
Definition at line 1131 of file string.cpp.
String & ucommon::String::operator| | ( | const char * | text | ) |
Concatenate null terminated text to our object. This creates a new copy-on-write instance to hold the concatenated string. This will eventually replace '+' when + creates a new string instance instead.
text | to concatenate. |
Definition at line 1226 of file string.cpp.
References ucommon::String::cstring::add(), set(), and str.
String & ucommon::String::operator|= | ( | const char * | text | ) |
Concatenate text to an existing string object. This will use the old behavior when +/= updated.
Definition at line 1119 of file string.cpp.
References set().
|
static |
Definition at line 868 of file string.cpp.
References len(), ucommon::max(), offset(), set(), and size().
void ucommon::String::paste | ( | size_t | offset, |
const char * | text, | ||
size_t | size = 0 |
||
) |
Insert (paste) text into string.
offset | to start paste. |
text | to paste. |
size | of text to paste. |
Definition at line 818 of file string.cpp.
References cow(), create(), ucommon::String::cstring::fix(), ucommon::String::cstring::len, offset(), set(), size(), str, and ucommon::String::cstring::text.
Referenced by ucommon::UString::paste(), and replace().
|
static |
Compute position in string.
text | of string. |
offset | from start, negative values from end. |
Definition at line 1422 of file string.cpp.
References len(), and offset().
Referenced by ucommon::UString::cut(), ucommon::UString::find(), ucommon::UString::get(), ucommon::UString::paste(), ucommon::UString::rfind(), rsplit(), seek(), and split().
size_t ucommon::String::printf | ( | const char * | format, |
... | |||
) |
Print items into a string object.
format | string of print format. |
Definition at line 633 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, len(), ucommon::String::cstring::max, str, and ucommon::String::cstring::text.
const char * ucommon::String::rchr | ( | char | character | ) | const |
Find pointer in string where specified character last appears.
character | to find. |
Definition at line 357 of file string.cpp.
References ch, str, and ucommon::String::cstring::text.
|
protectedvirtual |
Decrease retention of our reference counted cstring. May be overridden for memstring which has fixed cstring object.
Reimplemented in ucommon::memstring.
Definition at line 274 of file string.cpp.
References ucommon::CountedObject::release(), and str.
Referenced by operator=(), operator^=(), resize(), and ~String().
unsigned ucommon::String::replace | ( | const char * | string, |
const char * | text = NULL , |
||
unsigned | flags = 0 |
||
) |
Definition at line 477 of file string.cpp.
References count(), cut(), INSENSITIVE, ucommon::String::cstring::len, offset(), paste(), result(), str, and ucommon::String::cstring::text.
unsigned ucommon::String::replace | ( | regex & | expr, |
const char * | text = NULL , |
||
unsigned | flags = 0 |
||
) |
Definition at line 179 of file regex.cpp.
References cut(), ucommon::String::cstring::len, ucommon::String::regex::match(), ucommon::String::regex::members(), ucommon::String::regex::offset(), offset(), paste(), ucommon::String::regex::size(), str, and ucommon::String::cstring::text.
|
virtual |
Resize and re-allocate string memory.
size | to allocate for string. |
Reimplemented in ucommon::memstring.
Definition at line 913 of file string.cpp.
References create(), ucommon::CountedObject::is_copied(), ucommon::String::cstring::max, ucommon::CountedObject::release(), release(), ucommon::CountedObject::retain(), size(), and str.
Referenced by ucommon::UString::add().
|
protectedvirtual |
Increase retention of our reference counted cstring. May be overridden for memstring which has fixed cstring object.
Definition at line 268 of file string.cpp.
References ucommon::CountedObject::retain(), and str.
|
static |
Find the last occurrence of a character in a text buffer.
text | buffer to examine. |
list | of characters to search for. |
Definition at line 1755 of file string.cpp.
References str.
const char * ucommon::String::rfind | ( | const char * | list, |
size_t | offset = npos |
||
) | const |
Find last occurrence of character in the string.
list | of characters to search for. |
offset | to start of search. Default is end of string. |
Definition at line 398 of file string.cpp.
References ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
|
inlinestatic |
Definition at line 1238 of file string.h.
References ucommon::dup().
|
inline |
|
static |
void ucommon::String::rset | ( | const char * | text, |
char | overflow, | ||
size_t | offset, | ||
size_t | size = 0 |
||
) |
Set a text field within our string object offset from the end of buffer.
text | to set. |
overflow | character to use as filler if text is too short. |
offset | from end of object string buffer to set text at. |
size | of part of buffer to set with text and overflow. |
Definition at line 782 of file string.cpp.
References count(), len(), ucommon::String::cstring::max, offset(), set(), size(), str, and ucommon::String::cstring::text.
|
static |
Skip before trailing characters in a null terminated string.
text | pointer to start at. |
list | of characters to skip when found. |
Definition at line 1708 of file string.cpp.
const char * ucommon::String::rskip | ( | const char * | list, |
size_t | offset = npos |
||
) | const |
Skip trailing characters in the string. This searches the string in reverse order.
list | of characters to skip when found. |
offset | to start of scan. Default is end of string. |
Definition at line 380 of file string.cpp.
References ucommon::String::cstring::len, offset(), str, and ucommon::String::cstring::text.
void ucommon::String::rsplit | ( | const char * | pointer | ) |
Split the string by a pointer position. Everything before the pointer is removed.
pointer | to split position in string. |
Definition at line 695 of file string.cpp.
References ucommon::String::cstring::len, ucommon::String::cstring::set(), str, and ucommon::String::cstring::text.
Referenced by main().
void ucommon::String::rsplit | ( | size_t | offset | ) |
Split the string at a specific offset. Everything before the offset is removed.
offset | to split position in string. |
Definition at line 703 of file string.cpp.
References ucommon::String::cstring::len, pos(), ucommon::String::cstring::set(), str, and ucommon::String::cstring::text.
int ucommon::String::scanf | ( | const char * | format, |
... | |||
) |
Scan input items from a string object.
format | string of input to scan. |
Definition at line 670 of file string.cpp.
References str, and ucommon::String::cstring::text.
const char * ucommon::String::search | ( | const char * | string, |
unsigned | instance = 0 , |
||
unsigned | flags = 0 |
||
) | const |
Search for a substring in the string.
substring | to search for. |
flags | for case insensitive search. |
Definition at line 521 of file string.cpp.
References INSENSITIVE, ucommon::String::cstring::len, result(), str, and ucommon::String::cstring::text.
Referenced by operator*=().
const char * ucommon::String::search | ( | regex & | expr, |
unsigned | instance = 0 , |
||
unsigned | flags = 0 |
||
) | const |
Definition at line 158 of file regex.cpp.
References ucommon::String::regex::match(), ucommon::String::regex::members(), ucommon::String::regex::offset(), ucommon::String::regex::size(), str, and ucommon::String::cstring::text.
|
static |
Offset until next occurrence of character in a text or length.
text | buffer to examine. |
list | of characters to search for. |
Definition at line 1722 of file string.cpp.
|
static |
Safely set a null terminated string buffer in memory. If the text is too large to fit into the buffer, it is truncated to the size.
buffer | to set. |
size | of buffer. Includes null byte at end of string. |
text | to set in buffer. |
Definition at line 1548 of file string.cpp.
|
static |
Safely set a null terminated string buffer in memory. If the text is too large to fit into the buffer, it is truncated to the size.
buffer | to set. |
size | of buffer. Includes null byte at end of string. |
text | to set in buffer. |
max | size of text to set. |
Definition at line 1512 of file string.cpp.
void ucommon::String::set | ( | const char * | text | ) |
Set string object to text of a null terminated string.
text | string to set. |
Definition at line 802 of file string.cpp.
References create(), len(), ucommon::CountedObject::retain(), ucommon::String::cstring::set(), and str.
Referenced by add(), ost::MemPager::alloc(), ucommon::charbuf< S >::charbuf(), ucommon::cidr::cidr(), cow(), ucommon::shell::detach(), ucommon::MemoryProtocol::dup(), dup(), encodefile(), ucommon::shell::errexit(), ucommon::shell::errlog(), ucommon::typeref< const char * >::expand(), ucommon::getaddrinfo(), ucommon::shell::getargv(), header(), left(), ucommon::fsys::linkinfo(), ost::Lockfile::lock(), main(), ucommon::__context::map_cipher(), ucommon::MappedMemory::MappedMemory(), ost::Slog::open(), operator%(), operator&=(), operator+(), operator=(), ucommon::charbuf< S >::operator=(), ucommon::stringbuf< S >::operator=(), operator^=(), operator|(), operator|=(), paste(), ucommon::NamedTree::path(), ucommon::Socket::query(), ucommon::dir::read(), rset(), ucommon::cidr::set(), set(), ucommon::shell::set0(), ost::Assoc::setPointer(), ost::setString(), ucommon::shell::spawn(), ucommon::stringbuf< S >::stringbuf(), ucommon::shell::system(), unquote(), ucommon::UString::UString(), and ucommon::typeref< const char * >::value::value().
void ucommon::String::set | ( | const char * | text, |
char | overflow, | ||
size_t | offset, | ||
size_t | size = 0 |
||
) |
Set a text field within our string object.
text | to set. |
overflow | character to use as filler if text is too short. |
offset | in object string buffer to set text at. |
size | of part of buffer to set with text and overflow. |
Definition at line 758 of file string.cpp.
References count(), len(), ucommon::String::cstring::max, offset(), set(), size(), str, and ucommon::String::cstring::text.
void ucommon::String::set | ( | size_t | offset, |
const char * | text, | ||
size_t | size = 0 |
||
) |
Set a portion of the string object at a specified offset to a text string.
offset | in object string buffer. |
text | to set at offset. |
size | of text area to set or 0 until end of text. |
Definition at line 746 of file string.cpp.
References offset(), ucommon::String::cstring::set(), size(), and str.
size_t ucommon::String::size | ( | void | ) | const |
Get the size of currently allocated space for string.
Definition at line 137 of file string.cpp.
References ucommon::String::cstring::max, and str.
Referenced by ucommon::String::cstring::add(), ucommon::UString::add(), add(), b64(), b64decode(), b64encode(), b64size(), cow(), crc16(), crc24(), create(), ucommon::memstring::create(), ucommon::String::cstring::cstring(), ucommon::UString::cut(), cut(), eq_case(), equal(), fill(), ucommon::UString::get(), hex(), ucommon::_stream_operators::input(), left(), ucommon::memstring::memstring(), ucommon::UString::operator()(), ucommon::UString::paste(), paste(), ucommon::Socket::readline(), ucommon::String::regex::regex(), resize(), rset(), ucommon::String::cstring::set(), ucommon::UString::set(), set(), ucommon::str(), String(), and ucommon::UString::UString().
|
static |
Skip after lead characters in a null terminated string.
text | pointer to start at. |
list | of characters to skip when found. |
Definition at line 1694 of file string.cpp.
References str.
const char * ucommon::String::skip | ( | const char * | list, |
size_t | offset = 0 |
||
) | const |
Skip lead characters in the string.
list | of characters to skip when found. |
offset | to start of scan. |
Definition at line 367 of file string.cpp.
References ucommon::String::cstring::len, len(), offset(), str, and ucommon::String::cstring::text.
void ucommon::String::split | ( | const char * | pointer | ) |
Split the string by a pointer position. Everything after the pointer is removed.
pointer | to split position in string. |
Definition at line 711 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, pos(), str, and ucommon::String::cstring::text.
Referenced by main().
void ucommon::String::split | ( | size_t | offset | ) |
Split the string at a specific offset. Everything after the offset is removed.
offset | to split position in string. |
Definition at line 726 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, pos(), str, and ucommon::String::cstring::text.
|
static |
Skip lead and remove trailing characters from a text string. This function will modify memory.
text | buffer to examine. |
list | of characters to trim and chop. |
Definition at line 1636 of file string.cpp.
void ucommon::String::strip | ( | const char * | list | ) |
Strip lead and trailing characters from the string.
list | of characters to remove. |
Definition at line 445 of file string.cpp.
References chop(), and trim().
Referenced by ucommon::keyfile::load().
Swap the cstring references between two strings.
object1 | to swap. |
object2 | to swap. |
Definition at line 1383 of file string.cpp.
References str.
Referenced by ucommon::swap< string_t >().
|
inline |
|
inlinestatic |
|
inline |
A thread-safe token parsing routine for strings objects. This is related to strtok, but with safety checks for NULL values and a number of enhancements including support for quoted text that may contain token separators within quotes. The object is modified as it is parsed.
last | token position or set to NULL for start of string. |
list | of characters to use as token separators. |
quote | pairs of characters for quoted text or NULL if not used. |
end | of line marker characters or NULL if not used. |
Definition at line 1262 of file string.h.
References quote.
|
static |
A thread-safe token parsing routine for null terminated strings. This is related to strtok, but with safety checks for NULL values and a number of enhancements including support for quoted text that may contain token separators within quotes. The text string is modified as it is parsed.
text | string to examine for tokens. |
last | token position or set to NULL for start of string. |
list | of characters to use as token separators. |
quote | pairs of characters for quoted text or NULL if not used. |
end | of line marker characters or NULL if not used. |
Definition at line 1305 of file string.cpp.
References quote, and result().
Referenced by ucommon::StringPager::token().
|
inline |
|
inlinestatic |
|
static |
Return start of string after characters to trim from beginning. This function does not modify memory.
text | buffer to examine. |
list | of characters to skip from start. |
Definition at line 1608 of file string.cpp.
References str.
void ucommon::String::trim | ( | const char * | list | ) |
Trim lead characters from the string.
list | of characters to remove. |
Definition at line 451 of file string.cpp.
References clear(), ucommon::String::cstring::fix(), ucommon::String::cstring::len, len(), offset(), str, and ucommon::String::cstring::text.
Referenced by strip().
|
inline |
Trim lead characters from text.
count | of characters to remove. |
Definition at line 440 of file string.h.
References ucommon::operator+=().
|
static |
Unquote a quoted null terminated string. Returns updated string position and replaces trailing quote with null byte if quoted.
text | to examine. |
quote | pairs of character for open and close quote. |
Definition at line 1837 of file string.cpp.
bool ucommon::String::unquote | ( | const char * | quote | ) |
Unquote a quoted string. Removes lead and trailing quote marks.
quote | pairs of characters for open and close quote. |
Definition at line 565 of file string.cpp.
References ucommon::String::cstring::fix(), set(), str, and ucommon::String::cstring::text.
Referenced by ucommon::keyfile::load().
|
static |
Convert null terminated text to upper case.
text | to convert. |
Definition at line 1660 of file string.cpp.
References str.
void ucommon::String::upper | ( | void | ) |
Convert string to upper case.
Definition at line 584 of file string.cpp.
References str, and ucommon::String::cstring::text.
size_t ucommon::String::vprintf | ( | const char * | format, |
va_list | args | ||
) |
Print items into a string object.
format | string of print format. |
args | list to print. |
Definition at line 648 of file string.cpp.
References ucommon::String::cstring::fix(), ucommon::String::cstring::len, len(), ucommon::String::cstring::max, str, and ucommon::String::cstring::text.
int ucommon::String::vscanf | ( | const char * | format, |
va_list | args | ||
) |
Scan input items from a string object.
format | string of input to scan. |
args | list to scan into. |
Definition at line 661 of file string.cpp.
References str, and ucommon::String::cstring::text.
|
static |
Definition at line 265 of file string.h.
Referenced by ucommon::UString::cut(), offset(), and ucommon::UString::paste().
|
protected |
cstring instance our object references.
Definition at line 209 of file string.h.
Referenced by ucommon::String::cstring::add(), ucommon::UString::add(), add(), ucommon::UString::at(), at(), begin(), c_copy(), ucommon::memstring::c_copy(), c_str(), ucommon::UString::ccount(), ccount(), check(), chop(), chr(), clear(), compare(), count(), cow(), ucommon::UString::cut(), cut(), data(), end(), equal(), erase(), fill(), ucommon::UString::find(), find(), fix(), full(), ucommon::UString::get(), get(), hex2bin(), hexcount(), ifind(), len(), lower(), ucommon::memstring::memstring(), offset(), operator bool(), operator!(), operator%(), ucommon::UString::operator()(), operator()(), operator+(), operator++(), operator+=(), operator--(), operator-=(), operator=(), operator[](), operator|(), ucommon::UString::paste(), paste(), printf(), rchr(), release(), ucommon::memstring::release(), replace(), resize(), retain(), ucommon::UString::rfind(), rfind(), rset(), rskip(), rsplit(), scanf(), search(), seek(), ucommon::String::cstring::set(), ucommon::UString::set(), set(), size(), skip(), split(), String(), strip(), swap(), trim(), unquote(), upper(), ucommon::UString::UString(), vprintf(), vscanf(), and ucommon::memstring::~memstring().