Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_DRAFT int32_t U_EXPORT2 unorm2_spanQuickCheckYes ( const UNormalizer2 norm2,
const UChar *  s,
int32_t  length,
UErrorCode pErrorCode 

Returns the end of the normalized substring of the input string. In other words, with end=spanQuickCheckYes(s, ec); the substring UnicodeString(s, 0, end) will pass the quick check with a "yes" result.

The returned end index is usually one or more characters before the "no" or "maybe" character: The end index is at a normalization boundary. (See the class documentation for more about normalization boundaries.)

When the goal is a normalized string and most input strings are expected to be normalized already, then call this method, and if it returns a prefix shorter than the input string, copy that prefix and use normalizeSecondAndAppend() for the remainder.

norm2 UNormalizer2 instance
s input string
length length of the string, or -1 if NUL-terminated
pErrorCode Standard ICU error code. Its input value must pass the U_SUCCESS() test, or else the function returns immediately. Check for U_FAILURE() on output or use with function chaining. (See User Guide for details.)
"yes" span end index ICU 4.4

Definition at line 753 of file normalizer2.cpp.


    if(U_FAILURE(*pErrorCode)) {
        return 0;
    if(s==NULL || length<-1) {
        return 0;
    UnicodeString sString(length<0, s, length);
    return ((const Normalizer2 *)norm2)->spanQuickCheckYes(sString, *pErrorCode);

Generated by  Doxygen 1.6.0   Back to index