public enum SmallCaps extends Enum<SmallCaps>
Small caps are a typographic style where lowercase letters are replaced by smaller versions of uppercase letters. For example, "Hello" becomes "ʜᴇʟʟᴏ".
This class uses the Unicode characters for small caps, which are not supported by all fonts and platforms. It also strips accents from the input characters before converting them to small caps, as there are no Unicode characters for accented small caps.
| Enum Constant and Description |
|---|
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
hasSmallCaps(String string)
Checks if the given string contains any small caps characters.
|
static boolean |
isSmallCaps(char character)
Checks if the given character is a small caps character.
|
static char |
stripAccent(char character)
Strips accents from the given character.
|
static String |
stripAccents(String string)
Strips accents from the given string.
|
static String |
toNormal(String string)
Converts the given string from small caps to normal, replacing small caps
characters with their lowercase equivalents.
|
static String |
toSmallCaps(String string)
Converts the given string to small caps, replacing lowercase letters with
their small caps equivalents.
|
String |
toString() |
static SmallCaps |
valueOf(char character)
Returns the SmallCaps enum constant corresponding to the given character,
or null if none exists.
|
static SmallCaps |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SmallCaps[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SmallCaps A
public static final SmallCaps B
public static final SmallCaps C
public static final SmallCaps D
public static final SmallCaps E
public static final SmallCaps F
public static final SmallCaps G
public static final SmallCaps H
public static final SmallCaps I
public static final SmallCaps J
public static final SmallCaps K
public static final SmallCaps L
public static final SmallCaps M
public static final SmallCaps N
public static final SmallCaps O
public static final SmallCaps P
public static final SmallCaps Q
public static final SmallCaps R
public static final SmallCaps S
public static final SmallCaps T
public static final SmallCaps U
public static final SmallCaps V
public static final SmallCaps W
public static final SmallCaps X
public static final SmallCaps Y
public static final SmallCaps Z
public static SmallCaps[] values()
for (SmallCaps c : SmallCaps.values()) System.out.println(c);
public static SmallCaps valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static String stripAccents(String string)
string - The string to strip accents frompublic static char stripAccent(char character)
character - The character to strip accents frompublic static SmallCaps valueOf(char character)
This method strips accents from the input character before looking for a match.
character - The character to look for a SmallCaps enum constantpublic static boolean isSmallCaps(char character)
character - The character to checkpublic static boolean hasSmallCaps(String string)
string - The string to checkpublic static String toSmallCaps(String string)
This method strips accents from the input characters before converting them to small caps.
string - The string to convert to small capsCopyright © 2023. All rights reserved.