//
// regexst.h
//
-// Copyright (C) 2004-2008, International Business Machines Corporation and others.
+// Copyright (C) 2004-2012, International Business Machines Corporation and others.
// All Rights Reserved.
//
// This file contains class RegexStaticSets
0x5c, 0x70, 0x7b, 0x4d, 0x7d,
// \ p { N d } Digit_Numeric
0x5c, 0x70, 0x7b, 0x4e, 0x64, 0x7d,
-// \ p { P c } ] Connector_Punctuation
- 0x5c, 0x70, 0x7b, 0x50, 0x63, 0x7d, 0x5d, 0};
+// \ p { P c } Connector_Punctuation
+ 0x5c, 0x70, 0x7b, 0x50, 0x63, 0x7d,
+// \ u 2 0 0 c \ u 2 0 0 d ]
+ 0x5c, 0x75, 0x32, 0x30, 0x30, 0x63, 0x5c, 0x75, 0x32, 0x30, 0x30, 0x64, 0x5d, 0};
//
RegexStaticSets::RegexStaticSets(UErrorCode *status)
:
fUnescapeCharSet(UnicodeString(TRUE, gUnescapeCharPattern, -1), *status),
-fRuleDigitsAlias(NULL)
+fRuleDigitsAlias(NULL),
+fEmptyText(NULL)
{
// First zero out everything
int i;
for (i=0; i<(int32_t)(sizeof(fRuleSets)/sizeof(fRuleSets[0])); i++) {
fRuleSets[i].compact();
}
+
+ // Finally, initialize an empty string for utility purposes
+ fEmptyText = utext_openUChars(NULL, NULL, 0, status);
+
return; // If we reached this point, everything is fine so just exit
ExitConstrDeleteAll: // Remove fPropSets and fRuleSets and return error
fPropSets[i] = NULL;
}
fRuleDigitsAlias = NULL;
+
+ utext_close(fEmptyText);
}