mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-12647 Use inline string literals instead of renaming the variables.
X-SVN-Rev: 40932
This commit is contained in:
parent
c76083dc09
commit
05b4908921
1 changed files with 2 additions and 4 deletions
|
@ -4450,11 +4450,9 @@ UnicodeSet *RegexCompile::createSetForProperty(const UnicodeString &propName, UB
|
|||
// See if the property looks like a Java "InBlockName", which
|
||||
// we will recast as "Block=BlockName"
|
||||
//
|
||||
static const UChar strIN[] = {0x49, 0x6E, 0}; // "In"
|
||||
static const UChar strBLOCK[] = {0x42, 0x6C, 0x6f, 0x63, 0x6b, 0x3d, 00}; // "Block="
|
||||
if (mPropName.startsWith(strIN, 2) && propName.length()>=3) {
|
||||
if (mPropName.startsWith(u"In", 2) && propName.length()>=3) {
|
||||
setExpr.truncate(4); // Leaves "[\p{", or "[\P{"
|
||||
setExpr.append(strBLOCK, -1);
|
||||
setExpr.append(u"Block=", -1);
|
||||
setExpr.append(UnicodeString(mPropName, 2)); // Property with the leading "In" removed.
|
||||
setExpr.append(chRBrace);
|
||||
setExpr.append(chRBracket);
|
||||
|
|
Loading…
Add table
Reference in a new issue