public class CaseFolding extends Object
String.toUpperCase(locale).toLowerCase(locale)
. This is a little better than calling only String.toLowerCase(locale)
. For example, in German the string "ß" upercase equilavent is "SS". If we only
called only String.toLowerCase(java.util.Locale)
we would store "ß"in the index which would make
matching "SS" impossible. This does not always case fold correctly, for example the Turkish 'I', but it is a good
compromise.Constructor and Description |
---|
CaseFolding() |
Modifier and Type | Method and Description |
---|---|
static String |
foldString(String s1)
Case fold the passed string using the ENGLISH locale.
|
static String |
foldString(String s1,
Locale locale)
Case fold the passed string using the passed locale.
|
static String |
foldUsername(String username)
Deprecated.
Use
ApplicationUser.getKey() or IdentifierUtils.toLowerCase(String) . Since v6.0 |
public static String foldString(String s1)
s1
- the string to case fold. Cannot be null.public static String foldUsername(String username)
ApplicationUser.getKey()
or IdentifierUtils.toLowerCase(String)
. Since v6.0username
- the username to case fold.public static String foldString(String s1, Locale locale)
s1
- the string to case fold. Cannot be null.locale
- the locale to use for folding. Cannot be null.Copyright © 2002-2022 Atlassian. All Rights Reserved.