Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
QtCollator.java
Go to the documentation of this file.
1
// Copyright (C) 2026 Volker Krause <vkrause@kde.org>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
package
org.qtproject.qt.android;
5
6
import
android.icu.text.CollationKey;
7
import
android.icu.text.Collator;
8
import
java.util.Locale;
9
10
class
QtCollator
11
{
12
static
Collator getCollator(String bcp47Name,
int
strength)
13
{
14
Locale locale = Locale.forLanguageTag(bcp47Name);
15
Collator
c
= Collator.getInstance(locale);
16
// Match qcollator_icu.cpp which enables UCOL_NORMALIZATION_MODE on its native path.
17
c
.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
18
if
(strength >= 0) {
19
c
.setStrength(strength);
20
}
21
return
c
;
22
}
23
24
static
byte
[] getCollationKey(Collator collator, String
s
)
25
{
26
return
collator.getCollationKey(
s
).toByteArray();
27
}
28
}
s
GLdouble s
[6]
Definition
qopenglext.h:235
c
const GLubyte * c
Definition
qopenglext.h:12701
qtbase
src
android
jar
src
org
qtproject
qt
android
QtCollator.java
Generated on
for Qt by
1.18.0