summaryrefslogtreecommitdiff
path: root/thirdparty/icu4c/common/ubrk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/ubrk.cpp')
-rw-r--r--thirdparty/icu4c/common/ubrk.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/thirdparty/icu4c/common/ubrk.cpp b/thirdparty/icu4c/common/ubrk.cpp
index f8bdf5a6b6..bb5bdd1b50 100644
--- a/thirdparty/icu4c/common/ubrk.cpp
+++ b/thirdparty/icu4c/common/ubrk.cpp
@@ -174,6 +174,18 @@ ubrk_safeClone(
return (UBreakIterator *)newBI;
}
+U_CAPI UBreakIterator * U_EXPORT2
+ubrk_clone(const UBreakIterator *bi, UErrorCode *status) {
+ if (U_FAILURE(*status)) {
+ return nullptr;
+ }
+ BreakIterator *newBI = ((BreakIterator *)bi)->clone();
+ if (newBI == nullptr) {
+ *status = U_MEMORY_ALLOCATION_ERROR;
+ return nullptr;
+ }
+ return (UBreakIterator *)newBI;
+}
U_CAPI void U_EXPORT2