REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.74 KB
Close
/proc/thread-self/root/opt/alt/libicu/usr/share/doc/alt-libicu-devel/samples/translit/unaccent.cpp
Text
Base64
/********************************************************************** * © 2016 and later: Unicode, Inc. and others. * License & terms of use: http://www.unicode.org/copyright.html#License ********************************************************************** ********************************************************************** * COPYRIGHT: * Copyright (c) 1999-2003, International Business Machines Corporation and * others. All Rights Reserved. **********************************************************************/ #include "unaccent.h" const char UnaccentTransliterator::fgClassID = 0; /** * Constructor */ UnaccentTransliterator::UnaccentTransliterator() : normalizer("", UNORM_NFD), Transliterator("Unaccent", 0) { } /** * Destructor */ UnaccentTransliterator::~UnaccentTransliterator() { } /** * Remove accents from a character using Normalizer. */ UChar UnaccentTransliterator::unaccent(UChar c) const { UnicodeString str(c); UErrorCode status = U_ZERO_ERROR; UnaccentTransliterator* t = (UnaccentTransliterator*)this; t->normalizer.setText(str, status); if (U_FAILURE(status)) { return c; } return (UChar) t->normalizer.next(); } /** * Implement Transliterator API */ void UnaccentTransliterator::handleTransliterate(Replaceable& text, UTransPosition& index, UBool incremental) const { UnicodeString str("a"); while (index.start < index.limit) { UChar c = text.charAt(index.start); UChar d = unaccent(c); if (c != d) { str.setCharAt(0, d); text.handleReplaceBetween(index.start, index.start+1, str); } index.start++; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
answers
DIR
-
drwxr-xr-x
2024-03-03 22:40:17
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
main.cpp
3.92 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Makefile
638 B
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.TXT
3.83 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
translit.sln
1.18 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
translit.vcxproj
9.35 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
translit.vcxproj.filters
1.15 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
unaccent.cpp
1.74 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
unaccent.h
2.90 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util.cpp
2.24 KB
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util.h
880 B
lrw-r--r--
2019-04-17 19:42:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).