Classes, functions and macros used to handle Strings.
Compounds | |
class | RString |
specialization of RefClass1Interface<String, acdk::lang::Object, RComparable> to enable String related operators API: Java More... | |
struct | StaticAsciiLiteral |
this is a little helper class for fast comparing String with string literals. More... | |
class | String |
Similar to Java but extended Some extional function are inspired by the org.apache.commons.lang.StringUtils class. More... | |
struct | StringHash |
This template compiles a ascii string literal hash code at up to 20 characters at compile time. More... | |
Defines | |
#define | RCS(ptr) ::acdk::lang::constr(ptr) |
ptr is a constant (normally literal) ASCII or UTF byte character stream (const char*) String will not copy this into own buffer, but points to given ptr | |
#define | SCS(ptr) ::acdk::lang::stkstr(ptr) |
create string of given valid ASCII or UTF8 byte character stream stream. | |
#define | ACDK_STACK_STR(arg) ::acdk::lang::RString(::acdk::lang::String(arg)) |
to wrap a literal on stack with a string Use only if sure that the String (or derived substrings) will only lived in the current stack scope and no reference of the returned string will be stored outside scope | |
#define | _UC(text) ::acdk::lang::String::decodeAscUnicodeCharacter(text) |
wraps a literal string with embededded unicode escapes | |
#define | _US(text) ::acdk::lang::String::decodeAscUnicode(text) |
wraps a literal string with embededded unicode escapes an return it as character | |
#define | ASCLITERAL(strlit) static StaticAsciiLiteral lit_##strlit(#strlit) |
use this if you use a ascii literal in your source code. | |
#define | EXTERN_ASCLITERAL(strlit) extern acdk::lang::StaticAsciiLiteral lit_##strlit |
same as ASCLITERAL but with extern binding instead of static | |
#define | GLOBAL_ASCLITERAL(strlit) acdk::lang::StaticAsciiLiteral lit_##strlit(#strlit) |
same as ASCLITERAL but with no binding instead of static | |
#define | EXTERN_EXPORT_ASCLITERAL(Export, strlit) extern Export acdk::lang::StaticAsciiLiteral lit_##strlit |
same as EXTERN_ASCLITERAL but with DLL export tag | |
#define | EXPORT_ASCLITERAL(Export, strlit) Export acdk::lang::StaticAsciiLiteral lit_##strlit(#strlit) |
same as GLOBAL_ASCLITERAL but with DLL export tag | |
Enumerations | |
enum | StringStorageType { UnspecSST = 0x0000, NormalSST = 0x0001, SubSST = 0x0002, ConstSST = 0x0004, HashSST = 0x0008, StorageMaskSST = 0x000F } |
defines how the String class store its internal buffer More... | |
enum | CharacterClass { CCAscii = 0x0010, CCUcs2 = 0x0020, CCUcs4 = 0x0030, CCAnsi = 0x0040, CCUtf8 = 0x0050, CCUtf16 = 0x0060, CCOsNative = CCOS_NATIVE, CharacterClassMask = 0x00F0 } |
specifies the encoding of the character buffer More... | |
enum | CodePage { Ascii_CP = 0x0000, Latin_1_CP = 0x0100, CodePageMask = 0xFF00 } |
ISO code pages supported by string only used if CharacterClass is CCAnsi. More... | |
enum | TrimFlags { TrimSpace = 0x01, TrimNewLines = 0x02, TrimControl = 0x04, TrimWhiteSpace = TrimSpace | TrimNewLines | TrimControl, TrimLeft = 0x10, TrimRight = 0x20, TrimBoth = TrimLeft | TrimRight } |
flags for String::trim More... | |
Functions | |
RString | constr (const char *ptr) |
creates a const string | |
RString | constr (const uc2char *ptr) |
creates a const string | |
RString | stkstr (const char *ptr) |
ptr is a valid ASCII or UTF8 byte character stream (const char*) String create own buffer | |
RString | stkstr (const uc2char *ptr) |
ptr is a valid UCS-2 character stream (const uc2char*) String create own buffer | |
RString | stkstr (const uc4char *ptr) |
ptr is a valid UCS-4 character stream (const uc4char*) String create own buffer |
|
wraps a literal string with embededded unicode escapes
|
|
wraps a literal string with embededded unicode escapes an return it as character
|
|
to wrap a literal on stack with a string Use only if sure that the String (or derived substrings) will only lived in the current stack scope and no reference of the returned string will be stored outside scope
|
|
use this if you use a ascii literal in your source code. it declares a static varaible lit_strlit.
|
|
same as GLOBAL_ASCLITERAL but with DLL export tag
|
|
same as ASCLITERAL but with extern binding instead of static
|
|
same as EXTERN_ASCLITERAL but with DLL export tag
|
|
same as ASCLITERAL but with no binding instead of static
|
|
ptr is a constant (normally literal) ASCII or UTF byte character stream (const char*) String will not copy this into own buffer, but points to given ptr
|
|
create string of given valid ASCII or UTF8 byte character stream stream. String create own buffer |
|
specifies the encoding of the character buffer
|
|
ISO code pages supported by string only used if CharacterClass is CCAnsi.
|
|
defines how the String class store its internal buffer
|
|
flags for String::trim
|
|
creates a const string
|
|
creates a const string
|
|
ptr is a valid UCS-4 character stream (const uc4char*) String create own buffer
|
|
ptr is a valid UCS-2 character stream (const uc2char*) String create own buffer
|
|
ptr is a valid ASCII or UTF8 byte character stream (const char*) String create own buffer
|