public class CharArrayUtils extends Object
char [] arrays.| Modifier and Type | Field and Description |
|---|---|
static char[] |
EMPTY_ARRAY |
| Constructor and Description |
|---|
CharArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static float |
getCapitalizedRatio(char[] string)
Computes and returns the ratio of capitalized
letters in the string to the numbers of all letters.
|
static boolean |
hasCapitalizedLetters(char[] string)
Returns
true if the input array contains any capitalized
characters. |
static char[] |
toCapitalizedCopy(char[] string)
Returns a capitalized copy of the input character array.
|
static boolean |
toLowerCase(char[] word,
char[] buffer)
Convert to lower case (character-by-character) and save the result
into
buffer. |
static boolean |
toLowerCase(char[] word,
char[] buffer,
int start,
int length)
Convert to lower case (character-by-character) and save the result
into
buffer. |
static char[] |
toLowerCaseCopy(char[] array)
To lower case conversion.
|
static char[] |
toLowerCaseInPlace(char[] array)
In place to lower case conversion.
|
public static char[] toLowerCaseInPlace(char[] array)
public static char[] toLowerCaseCopy(char[] array)
public static float getCapitalizedRatio(char[] string)
public static boolean hasCapitalizedLetters(char[] string)
true if the input array contains any capitalized
characters.public static char[] toCapitalizedCopy(char[] string)
public static boolean toLowerCase(char[] word,
char[] buffer)
buffer.word - The word to be converted to lower case.buffer - The buffer where the result should be saved.true if at least one character was changed
between word and buffer. false indicates
an identical copy.AssertionError - If buffer is smaller than word.public static boolean toLowerCase(char[] word,
char[] buffer,
int start,
int length)
buffer. The buffer must have at least length
characters.word - The word to be converted to lower case.buffer - The buffer where the result should be saved.start - the index in the word at which to startlength - the number of characters from word to processtrue if at least one character was changed
between word and buffer. false indicates
an identical copy.AssertionError - If buffer is smaller than length.AssertionError - If start + length is smaller than the length word.