ICU-12677 clean up extra trailing spaces.

X-SVN-Rev: 40844
This commit is contained in:
Andy Heninger 2018-02-06 21:28:05 +00:00
parent 5315ad603e
commit be54542b86
2 changed files with 4 additions and 4 deletions

View file

@ -830,7 +830,7 @@ UnicodeString RBBIRuleScanner::stripRules(const UnicodeString &rules) {
UnicodeString strippedRules;
int32_t rulesLength = rules.length();
bool skippingSpaces = false;
for (int32_t idx=0; idx<rulesLength; idx = rules.moveIndex32(idx, 1)) {
UChar32 cp = rules.char32At(idx);
bool whiteSpace = u_hasBinaryProperty(cp, UCHAR_PATTERN_WHITE_SPACE);

View file

@ -4445,13 +4445,13 @@ void RBBITest::TestBug12677() {
" # .; # a comment that looks sort of like a rule. \n"
" '#' '?'; # a rule with a quoted # \n"
);
UErrorCode status = U_ZERO_ERROR;
UParseError pe;
RuleBasedBreakIterator bi (rules, pe, status);
RuleBasedBreakIterator bi(rules, pe, status);
assertSuccess(WHERE, status);
UnicodeString rtRules = bi.getRules();
assertEquals(WHERE, UnicodeString(u"!!forward; $x = [ab#]; '#' '?'; "), rtRules);
assertEquals(WHERE, UnicodeString(u"!!forward; $x = [ab#]; '#' '?'; "), rtRules);
}
//