Inheritance diagram for UStringPrep:
Public Types | |
enum | Options { Strict, Lenient } |
Public Member Functions | |
this (char[] path, char[] filename) | |
~this () | |
void | prepare (UText src, UString dst, Options o=Options.Strict) |
Static Public Member Functions | |
this () | |
~this () | |
Static Public Attributes | |
FunctionLoader Bind[] | targets |
Private Types | |
typedef void * | Handle |
enum | Error { OK, BufferOverflow = 15 } |
Static Private Member Functions | |
bool | isError (Error e) |
void | testError (Error e, char[] msg) |
char * | toString (char[] string) |
wchar * | toString (wchar[] string) |
uint | length (char *s) |
uint | length (wchar *s) |
char[] | toArray (char *s) |
wchar[] | toArray (wchar *s) |
Private Attributes | |
Handle | handle |
Static Private Attributes | |
void * | library |
StringPrep prepares Unicode strings for use in network protocols. Profiles of StingPrep are set of rules and data according to with the Unicode Strings are prepared. Each profiles contains tables which describe how a code point should be treated. The tables are broadly classied into
The procedure for preparing Unicode strings:
1. Map: For each character in the input, check if it has a mapping and, if so, replace it with its mapping.
2. Normalize: Possibly normalize the result of step 1 using Unicode normalization.
3. Prohibit: Check for any characters that are not allowed in the output. If any are found, return an error.
4. Check bidi: Possibly check for right-to-left characters, and if any are found, make sure that the whole string satisfies the requirements for bidirectional strings. If the string does not satisfy the requirements for bidirectional strings, return an error.
See this page for full details.
Definition at line 133 of file UStringPrep.d.
|
Use this for the primary argument-type to most ICU functions |
|
Definition at line 137 of file UStringPrep.d. |
|
ICU error codes (the ones which are referenced) |
|
Close this profile Definition at line 173 of file UStringPrep.d. |
|
Definition at line 244 of file UStringPrep.d. |
|
Creates a StringPrep profile from the data file. path string containing the full path pointing to the directory where the profile reside followed by the package name e.g. "/usr/resource/my_app/profiles/mydata" on a Unix system. if NULL, ICU default data files will be used. fileName name of the profile file to be opened Definition at line 159 of file UStringPrep.d. References ICU::testError(), and ICU::toString(). |
|
Prepare the input buffer This operation maps, normalizes(NFKC), checks for prohited and BiDi characters in the order defined by RFC 3454 depending on the options specified in the profile Definition at line 188 of file UStringPrep.d. References UString::format(), UText::get(), UText::len, and len. |
|
Definition at line 235 of file UStringPrep.d. |
|
Definition at line 158 of file ICU.d. Referenced by UConverter::detectSignature(), UString::format(), UCollator::getLocale(), and UConverter::this(). |
|
|
|
Definition at line 208 of file ICU.d. References string. |
|
Definition at line 230 of file ICU.d. References strlen(). |
|
Definition at line 239 of file ICU.d. References wcslen(). |
|
Definition at line 248 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 259 of file ICU.d. References wcslen(). |
|
Definition at line 135 of file UStringPrep.d. |
|
Bind the ICU functions from a shared library. This is complicated by the issues regarding D and DLLs on the Windows platform Definition at line 207 of file UStringPrep.d. |
|
Initial value: [ {cast(void**) &usprep_open, "usprep_open"} Definition at line 224 of file UStringPrep.d. |