Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
4package org.qtproject.qt.android;
5
6import android.icu.text.CollationKey;
7import android.icu.text.Collator;
8import java.util.Locale;
9
10class 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}
GLdouble s
[6]
Definition qopenglext.h:235
const GLubyte * c