Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: source/i18n/utrans.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/utf8collationiterator.cpp ('k') | source/i18n/winnmfmt.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/utrans.cpp
diff --git a/source/i18n/utrans.cpp b/source/i18n/utrans.cpp
index 16a09bdcb6a9e225b93cf9db6e5da3e8c8e29193..f4f86d521c05f4f6d1d0499b23982bfa19e2cbcb 100644
--- a/source/i18n/utrans.cpp
+++ b/source/i18n/utrans.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
- * Copyright (C) 1997-2009, International Business Machines
+ * Copyright (C) 1997-2009,2014 International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* Date Name Description
@@ -20,6 +20,7 @@
#include "unicode/uniset.h"
#include "unicode/ustring.h"
#include "unicode/uenum.h"
+#include "unicode/uset.h"
#include "uenumimp.h"
#include "cpputils.h"
#include "rbt.h"
@@ -492,4 +493,39 @@ utrans_transIncrementalUChars(const UTransliterator* trans,
}
}
+U_CAPI int32_t U_EXPORT2
+utrans_toRules( const UTransliterator* trans,
+ UBool escapeUnprintable,
+ UChar* result, int32_t resultLength,
+ UErrorCode* status) {
+ utrans_ENTRY(status) 0;
+ if ( (result==NULL)? resultLength!=0: resultLength<0 ) {
+ *status = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+
+ UnicodeString res;
+ res.setTo(result, 0, resultLength);
+ ((Transliterator*) trans)->toRules(res, escapeUnprintable);
+ return res.extract(result, resultLength, *status);
+}
+
+U_CAPI USet* U_EXPORT2
+utrans_getSourceSet(const UTransliterator* trans,
+ UBool ignoreFilter,
+ USet* fillIn,
+ UErrorCode* status) {
+ utrans_ENTRY(status) fillIn;
+
+ if (fillIn == NULL) {
+ fillIn = uset_openEmpty();
+ }
+ if (ignoreFilter) {
+ ((Transliterator*) trans)->handleGetSourceSet(*((UnicodeSet*)fillIn));
+ } else {
+ ((Transliterator*) trans)->getSourceSet(*((UnicodeSet*)fillIn));
+ }
+ return fillIn;
+}
+
#endif /* #if !UCONFIG_NO_TRANSLITERATION */
« no previous file with comments | « source/i18n/utf8collationiterator.cpp ('k') | source/i18n/winnmfmt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698