ICU-1997 uprv_isRuleWhiteSpace
X-SVN-Rev: 9527
This commit is contained in:
parent
82322db82c
commit
f0566b427e
@ -25,6 +25,8 @@
|
||||
#include "cmemory.h"
|
||||
#endif
|
||||
|
||||
#include "uprops.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
#if 0
|
||||
@ -142,7 +144,7 @@ NFRuleSet::NFRuleSet(UnicodeString* descriptions, int32_t index, UErrorCode& sta
|
||||
status = U_PARSE_ERROR;
|
||||
} else {
|
||||
name.setTo(description, 0, pos);
|
||||
while (pos < description.length() && u_isWhitespace(description.charAt(++pos))) {
|
||||
while (pos < description.length() && uprv_isRuleWhiteSpace(description.charAt(++pos))) {
|
||||
}
|
||||
description.remove(0, pos);
|
||||
}
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "nfrlist.h"
|
||||
#include "nfsubs.h"
|
||||
|
||||
#include "uprops.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
extern const UChar* CSleftBracket;
|
||||
@ -238,7 +240,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status)
|
||||
descriptor.setTo(description, 0, p);
|
||||
|
||||
++p;
|
||||
while (p < description.length() && u_isWhitespace(description.charAt(p))) {
|
||||
while (p < description.length() && uprv_isRuleWhiteSpace(description.charAt(p))) {
|
||||
++p;
|
||||
}
|
||||
description.removeBetween(0, p);
|
||||
@ -281,7 +283,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status)
|
||||
else if (c == gSlash || c == gGreaterThan) {
|
||||
break;
|
||||
}
|
||||
else if (u_isWhitespace(c) || c == gComma || c == gDot) {
|
||||
else if (uprv_isRuleWhiteSpace(c) || c == gComma || c == gDot) {
|
||||
}
|
||||
else {
|
||||
// throw new IllegalArgumentException("Illegal character in rule descriptor");
|
||||
@ -310,7 +312,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status)
|
||||
else if (c == gGreaterThan) {
|
||||
break;
|
||||
}
|
||||
else if (u_isWhitespace(c) || c == gComma || c == gDot) {
|
||||
else if (uprv_isRuleWhiteSpace(c) || c == gComma || c == gDot) {
|
||||
}
|
||||
else {
|
||||
// throw new IllegalArgumentException("Illegal character is rule descriptor");
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
#include "uprops.h"
|
||||
|
||||
static const UChar gPercentPercent[] =
|
||||
{
|
||||
@ -451,7 +452,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, UParseError& pErr, UErro
|
||||
lpEnd = description.length() - 1;
|
||||
}
|
||||
int lpStart = lp + u_strlen(gLenientParse);
|
||||
while (u_isWhitespace(description.charAt(lpStart))) {
|
||||
while (uprv_isRuleWhiteSpace(description.charAt(lpStart))) {
|
||||
++lpStart;
|
||||
}
|
||||
|
||||
@ -557,7 +558,7 @@ RuleBasedNumberFormat::stripWhitespace(UnicodeString& description)
|
||||
while (start != -1 && start < description.length()) {
|
||||
// seek to the first non-whitespace character...
|
||||
while (start < description.length()
|
||||
&& u_isWhitespace(description.charAt(start))) {
|
||||
&& uprv_isRuleWhiteSpace(description.charAt(start))) {
|
||||
++start;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user