Package com.yahoo.text
Class Text
- java.lang.Object
-
- com.yahoo.text.Text
-
public final class Text extends java.lang.Object
Text utility functions.- Author:
- bratseth
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isDisplayable(int codePoint)
Returns whether the given code point is displayable.static boolean
isTextCharacter(int codepoint)
Returns whether the given codepoint is a valid text character, potentially suitable for purposes such as indexing and display, see http://www.w3.org/TR/2006/REC-xml11-20060816/#charsetsstatic java.lang.String
stripInvalidCharacters(java.lang.String string)
Returns a string where any invalid characters in the input string is replaced by spacesstatic java.util.OptionalInt
validateTextString(java.lang.String string)
Validates that the given string value only contains text characters and returns the first illegal code point if one is found.
-
-
-
Method Detail
-
isTextCharacter
public static boolean isTextCharacter(int codepoint)
Returns whether the given codepoint is a valid text character, potentially suitable for purposes such as indexing and display, see http://www.w3.org/TR/2006/REC-xml11-20060816/#charsets
-
validateTextString
public static java.util.OptionalInt validateTextString(java.lang.String string)
Validates that the given string value only contains text characters and returns the first illegal code point if one is found.
-
isDisplayable
public static boolean isDisplayable(int codePoint)
Returns whether the given code point is displayable.
-
stripInvalidCharacters
public static java.lang.String stripInvalidCharacters(java.lang.String string)
Returns a string where any invalid characters in the input string is replaced by spaces
-
-