|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.CharArrayUtils
public class CharArrayUtils
A number of useful methods for working with char [] arrays.
| Field Summary | |
|---|---|
static char[] |
EMPTY_ARRAY
|
| Constructor Summary | |
|---|---|
CharArrayUtils()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char[] EMPTY_ARRAY
| Constructor Detail |
|---|
public CharArrayUtils()
| Method Detail |
|---|
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 process
true 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.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||