public class Strings
extends java.lang.Object
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
camelToWords(java.lang.String str) |
static java.lang.String |
replace(java.lang.String str,
java.lang.String from,
java.lang.String to)
Replaces all occurences of 'from' by 'to'.
|
static java.lang.String |
translate(java.lang.String s,
char[] from,
char[] to)
Translates all occurences of characters in the
char array 'from' to the characters in 'to'.
|
static java.lang.String |
translate(java.lang.String str,
char from,
char to)
Translates all occurences of char 'from' to char 'to'.
|
public static java.lang.String translate(java.lang.String s, char[] from, char[] to)
s
- The string to be translated.from
- The characters to be replaced.to
- The replacement characters.public static java.lang.String translate(java.lang.String str, char from, char to)
str
- The string to be translated.from
- The character to be replaced.to
- The replacement character.public static java.lang.String replace(java.lang.String str, java.lang.String from, java.lang.String to)
str
- The string to be processed.from
- The text to be replaced.to
- The replacement text.public static java.lang.String camelToWords(java.lang.String str)