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

UnicodeSet *U_EXPORT2 UnicodeSet::createFrom ( const UnicodeString s  )  [static]

Makes a set from a multicharacter string. Thus "ch" => {"ch"}
Warning: you cannot add an empty string ("") to a UnicodeSet.

Parameters:
s the source string
Returns:
a newly created set containing the given string. The caller owns the return object and is responsible for deleting it. ICU 2.4
Makes a set from a multicharacter string. Thus "ch" => {"ch"}
Warning: you cannot add an empty string ("") to a UnicodeSet.
Parameters:
the source string
Returns:
a newly created set containing the given string

Definition at line 1120 of file uniset.cpp.

References NULL, and UnicodeSet().

                                                                   {
    UnicodeSet *set = new UnicodeSet();
    if (set != NULL) { // Check for memory allocation error.
        set->add(s);
    }
    return set;
}


Generated by  Doxygen 1.6.0   Back to index