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

U_STABLE UChar* U_EXPORT2 u_strpbrk ( const UChar *  string,
const UChar *  matchSet 
)

Locates the first occurrence in the string string of any of the characters in the string matchSet. Works just like C's strpbrk but with Unicode.

Parameters:
string The string in which to search, NUL-terminated.
matchSet A NUL-terminated string defining a set of code points for which to search in the text string.
Returns:
A pointer to the character in string that matches one of the characters in matchSet, or NULL if no such character is found. ICU 2.0

Definition at line 537 of file ustring.c.

References NULL, and TRUE.

{
    int32_t idx = _matchFromSet(string, matchSet, TRUE);
    if(idx >= 0) {
        return (UChar *)string + idx;
    } else {
        return NULL;
    }
}


Generated by  Doxygen 1.6.0   Back to index