diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-28 17:54:57 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-28 17:54:57 +0000 |
commit | eb3451793aaf42870e44281708ccac51c010e837 (patch) | |
tree | 51c5f3646653b5153a74a2828b2af20c41cbd8d1 /icu4c/source/samples/citer/citer.cpp | |
parent | e710c4fbd23e1b7d97da0a88a8499326861ad250 (diff) | |
parent | 8144ba71b4efcfe46cd0e76e85d371bcc7d55567 (diff) | |
download | icu-eb3451793aaf42870e44281708ccac51c010e837.tar.gz |
Snap for 11641499 from 8144ba71b4efcfe46cd0e76e85d371bcc7d55567 to build-tools-release
Change-Id: Ic926bb7ff166e37b678ae2768581ebec18fcea4a
Diffstat (limited to 'icu4c/source/samples/citer/citer.cpp')
-rw-r--r-- | icu4c/source/samples/citer/citer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/icu4c/source/samples/citer/citer.cpp b/icu4c/source/samples/citer/citer.cpp index f81937071..d9a095f3f 100644 --- a/icu4c/source/samples/citer/citer.cpp +++ b/icu4c/source/samples/citer/citer.cpp @@ -36,7 +36,7 @@ void printUnicodeString(const UnicodeString &s) void printUChar(UChar32 ch) { if(ch < 127) { - u_fprintf(out, "%C", (UChar) ch); + u_fprintf(out, "%C", (char16_t) ch); } else if (ch == CharacterIterator::DONE) { u_fprintf(out, "[CharacterIterator::DONE = 0xFFFF]"); } else { @@ -56,7 +56,7 @@ void Test::TestUChariter() { "to the aid of their country."; UnicodeString testString(testChars,""); - const UChar *testText = testString.getTerminatedBuffer(); + const char16_t *testText = testString.getTerminatedBuffer(); UCharCharacterIterator iter(testText, u_strlen(testText)); UCharCharacterIterator* test2 = iter.clone(); @@ -80,7 +80,7 @@ void Test::TestUChariter() { // Demonstrates seeking forward using the iterator. u_fprintf(out, "Forward = "); - UChar c = iter.first(); + char16_t c = iter.first(); printUChar(c); // The first char int32_t i = 0; @@ -123,7 +123,7 @@ void Test::TestStringiter() { "to the aid of their country."; UnicodeString testString(testChars,""); - const UChar *testText = testString.getTerminatedBuffer(); + const char16_t *testText = testString.getTerminatedBuffer(); StringCharacterIterator iter(testText, u_strlen(testText)); StringCharacterIterator* test2 = iter.clone(); @@ -142,7 +142,7 @@ void Test::TestStringiter() { u_fprintf(out, "Backwards: "); - UChar c = iter.last(); + char16_t c = iter.last(); int32_t i = iter.endIndex(); printUChar(c); @@ -180,11 +180,11 @@ void Test::TestStringiter() { } /* Creating and using text boundaries */ -int main( void ) +int main() { UErrorCode status = U_ZERO_ERROR; - out = u_finit(stdout, NULL, NULL); + out = u_finit(stdout, nullptr, nullptr); u_fprintf(out, "ICU Iteration Sample Program (C++)\n\n"); |