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

UnicodeString & TransliterationRuleSet::toRules ( UnicodeString ruleSource,
UBool  escapeUnprintable 
) const [virtual]

Create rule strings that represents this rule set.

result string to receive the rule strings. Current contents will be deleted.
escapeUnprintable True, will escape the unprintable characters
A reference to 'result'.
Create rule strings that represents this rule set.

Definition at line 427 of file rbt_set.cpp.

References UnicodeString::append(), UVector::elementAt(), ruleVector, UVector::size(), TransliterationRule::toRule(), and UnicodeString::truncate().

Referenced by RuleBasedTransliterator::toRules().

    int32_t i;
    int32_t count = ruleVector->size();
    for (i=0; i<count; ++i) {
        if (i != 0) {
            ruleSource.append((UChar) 0x000A /*\n*/);
        TransliterationRule *r =
            (TransliterationRule*) ruleVector->elementAt(i);
        r->toRule(ruleSource, escapeUnprintable);
    return ruleSource;

Generated by  Doxygen 1.6.0   Back to index