public class StringUtils
extends java.lang.Object
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
count(java.lang.String s,
java.lang.String toCount)
Count the amount of occurrences of a string in another string.
|
static java.lang.String |
cut(java.lang.String s,
char filler,
int length)
Cut the string to the given length.
|
static java.lang.String |
cut(java.lang.String s,
int length)
Cut the string to the given length.
|
static java.lang.String |
flip(java.lang.String s)
Flip the given string.
|
static java.lang.String |
repeat(char c,
int count)
Repeat the char a given amount of times.
|
static java.lang.String |
repeat(java.lang.String s,
int count)
Repeat the string a given amount of times.
|
static java.lang.String |
uppercaseFirst(java.lang.String s)
Uppercase the first letter of the string and lowercase the rest.
|
public static java.lang.String uppercaseFirst(java.lang.String s)
s - The string to uppercasepublic static java.lang.String repeat(char c,
int count)
c - The char to repeatcount - The amount of times to repeatpublic static java.lang.String repeat(java.lang.String s,
int count)
s - The string to repeatcount - The amount of times to repeatpublic static java.lang.String cut(java.lang.String s,
int length)
s - The string to cutlength - The length to cut topublic static java.lang.String cut(java.lang.String s,
char filler,
int length)
s - The string to cutfiller - The filler to add if the string is shorterlength - The length to cut topublic static int count(java.lang.String s,
java.lang.String toCount)
s - The string to search intoCount - The string to countpublic static java.lang.String flip(java.lang.String s)
s - The string to flip