public final class StringUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
combineSplit(String[] split,
int start)
Combines an array into a space-delimited string from a starting index.
|
static String |
combineSplit(String[] split,
int start,
int length,
String delimiter)
Combines an array into a super string!
|
static String |
makeRainbow(String message)
Turns a message into a rainbow.
|
static String |
makeRainbow(String message,
Format[] colorOrder)
Turns a message into a rainbow.
|
static String |
toLowerCase(ClientLinked linked,
String input)
Converts a given String to lowercase per spec.
|
static String |
toLowerCase(Client client,
String input)
Converts a given String to lowercase per spec.
|
@Nonnull public static String combineSplit(@Nonnull String[] split, int start, int length, @Nonnull String delimiter)
Invalid index or length, or a length too long for the array, will be ignored.
split
- the split arraystart
- index at which to startlength
- how many elements to includedelimiter
- delimiterIllegalArgumentException
- for a null array, a length less than
1, an index less than 0, or a null delimiter@Nonnull public static String combineSplit(@Nonnull String[] split, int start)
Invalid starting index will result
split
- the split arraystart
- index at which to startIllegalArgumentException
- for null array or index less than 0@Nonnull public static String makeRainbow(@Nonnull String message)
message
- message to become rainbowIllegalArgumentException
- for null message@Nonnull public static String makeRainbow(@Nonnull String message, @Nonnull Format[] colorOrder)
message
- message to become rainbowcolorOrder
- order of colors to sendIllegalArgumentException
- for null parameters, null entries in
array, or non-color entries in array@Nonnull public static String toLowerCase(@Nonnull ClientLinked linked, @Nonnull String input)
linked
- the client providerinput
- string to be lowercasedIllegalArgumentException
- if client provider is nullIllegalArgumentException
- if input is nullCaseMapping.toLowerCase(java.lang.String)
@Nonnull public static String toLowerCase(@Nonnull Client client, @Nonnull String input)
client
- the clientinput
- string to be lowercasedIllegalArgumentException
- if client is nullIllegalArgumentException
- if input is nullCaseMapping.toLowerCase(java.lang.String)
Copyright © 2013–2019 Kitteh. All rights reserved.