@Internal public final class SimpleStringUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SimpleStringUtils.WhitespaceTokenizer
A tokenizer for string values that uses whitespace characters as token delimiters.
|
Modifier and Type | Method and Description |
---|---|
static void |
replaceNonWordChars(StringValue string,
char replacement)
Replaces all non-word characters in a string by a given character.
|
static void |
toLowerCase(StringValue string)
Converts the given
StringValue into a lower case variant. |
public static void toLowerCase(StringValue string)
StringValue
into a lower case variant.string
- The string to convert to lower case.public static void replaceNonWordChars(StringValue string, char replacement)
Character.isLetter(char)
or
Character.isDigit(char)
, as well as the underscore character.
This operation is intended to simplify strings for counting distinct words.
string
- The string value to have the non-word characters replaced.replacement
- The character to use as the replacement.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.