Inheritance diagram for UText:
Public Types | |
typedef opIndex | charAt |
enum | CaseOption { Default = 0, SpecialI = 1 } |
Public Member Functions | |
this (wchar[] content) | |
package wchar[] | get () |
override int | opEquals (Object o) |
override int | opCmp (Object o) |
override uint | toHash () |
UString | copy () |
UString | extract (uint start, uint len=uint.max) |
uint | codePoints (uint start=0, uint length=uint.max) |
bool | hasSurrogates (uint start=0, uint length=uint.max) |
wchar | opIndex (uint index) |
uint | length () |
int | compare (UText other, bool codePointOrder=false) |
int | compare (wchar[] other, bool codePointOrder=false) |
int | compareFolded (UText other, CaseOption option=CaseOption.Default) |
int | compareFolded (wchar[] other, CaseOption option=CaseOption.Default) |
bool | startsWith (UText other) |
bool | startsWith (wchar[] chars) |
bool | endsWith (UText other) |
bool | endsWith (wchar[] chars) |
uint | indexOf (wchar c, uint start=0) |
uint | indexOf (UText other, uint start=0) |
uint | indexOf (wchar[] chars, uint start=0) |
uint | lastIndexOf (wchar c, uint start=uint.max) |
uint | lastIndexOf (UText other, uint start=uint.max) |
uint | lastIndexOf (wchar[] chars, uint start=uint.max) |
UString | toLower (UString dst) |
UString | toLower (UString dst, inout ULocale locale) |
UString | toUpper (UString dst) |
UString | toUpper (UString dst, inout ULocale locale) |
UString | toFolded (UString dst, CaseOption option=CaseOption.Default) |
char[] | toUtf8 (char[] dst=null) |
UText | trim () |
UString | unEscape () |
uint | getCharStart (uint i) |
uint | getCharLimit (uint i) |
private void | pinIndex (inout uint x) |
private void | pinIndices (inout uint start, inout uint length) |
private int | compareFolded (wchar[] s1, wchar[] s2, CaseOption option=CaseOption.Default) |
Static Public Member Functions | |
static bool | isSurrogate (wchar c) |
static bool | isLeading (wchar c) |
static bool | isTrailing (wchar c) |
static | this () |
static | ~this () |
Public Attributes | |
package uint | len |
package wchar[] | content |
Static Public Attributes | |
static FunctionLoader Bind[] | targets |
Private Types | |
typedef void * | Handle |
enum | Error { OK, BufferOverflow = 15 } |
Private Member Functions | |
this () | |
Static Private Member Functions | |
static void | test () |
static bool | isError (Error e) |
static void | testError (Error e, char[] msg) |
static char * | toString (char[] string) |
static wchar * | toString (wchar[] string) |
static uint | length (char *s) |
static uint | length (wchar *s) |
static char[] | toArray (char *s) |
static wchar[] | toArray (wchar *s) |
Private Attributes | |
bool | mutable |
Static Private Attributes | |
static void * | library |
Classes | |
class | VersionIsolated |
Definition at line 652 of file UString.d.
|
|
|
Use this for the primary argument-type to most ICU functions |
|
|
|
ICU error codes (the ones which are referenced) |
|
|
|
Hidden constructor |
|
Construct read-only wrapper around the given content |
|
|
Is this UText equal to another? |
|
Compare this UText to another. Definition at line 744 of file UString.d. References compare(). |
|
Hash this UText |
|
Clone this UText into a UString Definition at line 773 of file UString.d. References UString. |
|
Clone a section of this UText into a UString Definition at line 784 of file UString.d. References pinIndices(), and UString. |
|
Count unicode code points in the length UChar code units of the string. A code point may occupy either one or two UChar code units. Counting code points involves reading all code units. Definition at line 799 of file UString.d. References pinIndices(). Referenced by hasSurrogates(). |
|
Return an indication whether or not there are surrogate pairs within the string. Definition at line 812 of file UString.d. References codePoints(), and pinIndices(). |
|
Return the character at the specified position. |
|
Return the length of the valid content Definition at line 837 of file UString.d. Referenced by UTransform::execute(), UCollator::getSortKey(), UString::realloc(), URegex::replaceAll(), URegex::replaceFirst(), UTransform::setFilter(), USearch::setPattern(), UDecimalFormat::setPattern(), UDateFormat::setPattern(), USearch::setText(), URegex::setText(), UBreakIterator::setText(), UString::setTo(), and this(). |
|
The comparison can be done in code unit order or in code point order. They differ only in UTF-16 when comparing supplementary code points (U+10000..U+10ffff) to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff. Definition at line 855 of file UString.d. References get(). Referenced by opCmp(). |
|
The comparison can be done in code unit order or in code point order. They differ only in UTF-16 when comparing supplementary code points (U+10000..U+10ffff) to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff. |
|
The comparison can be done in UTF-16 code unit order or in code point order. They differ only when comparing supplementary code points (U+10000..U+10ffff) to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff. Definition at line 891 of file UString.d. References content. Referenced by compareFolded(), endsWith(), and startsWith(). |
|
The comparison can be done in UTF-16 code unit order or in code point order. They differ only when comparing supplementary code points (U+10000..U+10ffff) to BMP code points near the end of the BMP (i.e., U+e000..U+ffff). In code unit order, high BMP code points sort after supplementary code points because they are stored as pairs of surrogates which are at U+d800..U+dfff. Definition at line 909 of file UString.d. References compareFolded(). |
|
Does this UText start with specified string? Definition at line 920 of file UString.d. References get(). |
|
Does this UText start with specified string? Definition at line 931 of file UString.d. References compareFolded(). |
|
Does this UText end with specified string? Definition at line 944 of file UString.d. References get(). |
|
Does this UText end with specified string? Definition at line 955 of file UString.d. References compareFolded(). |
|
Find the first occurrence of a BMP code point in a string. A surrogate code point is found only if its match in the text is not part of a surrogate pair. Definition at line 970 of file UString.d. References pinIndex(). Referenced by indexOf(). |
|
Find the first occurrence of a substring in a string. The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. Otherwise, the substring edge units would be matched against halves of surrogate pairs. |
|
Find the first occurrence of a substring in a string. The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. Otherwise, the substring edge units would be matched against halves of surrogate pairs. Definition at line 1008 of file UString.d. References pinIndex(). |
|
Find the last occurrence of a BMP code point in a string. A surrogate code point is found only if its match in the text is not part of a surrogate pair. Definition at line 1025 of file UString.d. References pinIndex(). Referenced by lastIndexOf(). |
|
Find the last occurrence of a BMP code point in a string. A surrogate code point is found only if its match in the text is not part of a surrogate pair. Definition at line 1042 of file UString.d. References get(), and lastIndexOf(). |
|
Find the last occurrence of a substring in a string. The substring is found at code point boundaries. That means that if the substring begins with a trail surrogate or ends with a lead surrogate, then it is found only if these surrogates stand alone in the text. Otherwise, the substring edge units would be matched against halves of surrogate pairs. Definition at line 1059 of file UString.d. References pinIndex(). |
|
Lowercase the characters into a seperate UString. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. Note that the return value refers to the provided destination UString. Definition at line 1080 of file UString.d. References Default. |
|
Lowercase the characters into a seperate UString. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. Note that the return value refers to the provided destination UString. Definition at line 1097 of file UString.d. References UString::expand(), UString::format(), and ICU::toString(). |
|
Uppercase the characters into a seperate UString. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. Note that the return value refers to the provided destination UString. Definition at line 1120 of file UString.d. References Default. |
|
Uppercase the characters into a seperate UString. Casing is locale-dependent and context-sensitive. The result may be longer or shorter than the original. Note that the return value refers to the provided destination UString. Definition at line 1137 of file UString.d. References UString::expand(), UString::format(), and ICU::toString(). |
|
Case-fold the characters into a seperate UString. Case-folding is locale-independent and not context-sensitive, but there is an option for whether to include or exclude mappings for dotted I and dotless i that are marked with 'I' in CaseFolding.txt. The result may be longer or shorter than the original. Note that the return value refers to the provided destination UString. Definition at line 1163 of file UString.d. References UString::expand(), and UString::format(). |
|
Converts a sequence of wchar (UTF-16) to UTF-8 bytes. If the output array is not provided, an array of appropriate size will be allocated and returned. Where the output is provided, it must be large enough to hold potentially four bytes per character for surrogate-pairs or three bytes per character for BMP only. Consider using UConverter where streaming conversions are required. Returns an array slice representing the valid UTF8 content. Definition at line 1188 of file UString.d. References ICU::testError(). |
|
Remove leading and trailing whitespace from this UText. Note that we slice the content to remove leading space. |
|
Unescape a string of characters and write the resulting Unicode characters to the destination buffer. The following escape sequences are recognized: uhhhh 4 hex digits; h in [0-9A-Fa-f] Uhhhhhhhh 8 hex digits xhh 1-2 hex digits x{h...} 1-8 hex digits ooo 1-3 octal digits; o in [0-7] cX control-X; X is masked with 0x1F as well as the standard ANSI C escapes: a => U+0007, \b => U+0008, \t => U+0009, \n => U+000A, v => U+000B, \f => U+000C, \r => U+000D, \e => U+001B, \" =U+0022, \' => U+0027, \? => U+003F, \\ => U+005C Anything else following a backslash is generically escaped. For example, "[a\\-z]" returns "[a-z]". If an escape sequence is ill-formed, this method returns an empty string. An example of an ill-formed sequence is "\\u" followed by fewer than 4 hex digits. Definition at line 1257 of file UString.d. References UString::truncate(), and UString. |
|
Is this code point a surrogate (U+d800..U+dfff)? |
|
Is this code unit a lead surrogate (U+d800..U+dbff)? |
|
Is this code unit a trail surrogate (U+dc00..U+dfff)? |
|
Adjust a random-access offset to a code point boundary at the start of a code point. If the offset points to the trail surrogate of a surrogate pair, then the offset is decremented. Otherwise, it is not modified. |
|
Adjust a random-access offset to a code point boundary after a code point. If the offset is behind the lead surrogate of a surrogate pair, then the offset is incremented. Otherwise, it is not modified. |
|
Pin the given index to a valid position. Definition at line 1371 of file UString.d. Referenced by indexOf(), and lastIndexOf(). |
|
Pin the given index and length to a valid position. Definition at line 1383 of file UString.d. Referenced by codePoints(), extract(), hasSurrogates(), UString::opCat(), UString::remove(), and UString::setTo(). |
|
Helper for comparison methods Definition at line 1398 of file UString.d. References ICU::testError(). |
|
|
|
|
|
Definition at line 156 of file ICU.d. Referenced by UCollator::getLocale(). |
|
|
|
|
|
Definition at line 228 of file ICU.d. References strlen(). Referenced by UConverter::UTranscoder::convert(). |
|
Definition at line 237 of file ICU.d. References wcslen(). |
|
Definition at line 246 of file ICU.d. References strlen(). Referenced by UConverter::detectSignature(), UResourceBundle::getKey(), UResourceBundle::getLocale(), UMessageFormat::getLocale(), UCollator::getLocale(), UConverter::getName(), UChar::getPropertyName(), UChar::getPropertyValueName(), and UConverter::opApply(). |
|
Definition at line 257 of file ICU.d. References wcslen(). |
|
|
Definition at line 660 of file UString.d. Referenced by compareFolded(), UTransform::execute(), UString::opCat(), UDateFormat::parse(), UNumberFormat::parseDouble(), UNumberFormat::parseInteger(), UNumberFormat::parseLong(), UString::setTo(), and this(). |
|
|
|
Bind the ICU functions from a shared library. This is complicated by the issues regarding D and DLLs on the Windows platform |
|
Initial value: [ {cast(void**) &u_strFindFirst, "u_strFindFirst"} |