public class WritingConversion
extends java.lang.Object
Constructor and Description |
---|
WritingConversion() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
reduceToASCIILetters(java.lang.String string,
boolean replaceUnsupportedChars)
Reduces String to ASCII letters by removing punctuation and redundant whitespaces
and replacing non-ASCII letters with similar ASCII letters if available.
|
static java.lang.String |
removeDiacriticalMarks(java.lang.String string)
Remove any diacritical marks (accents like ç, ñ, é, etc) from the given string.
|
static java.lang.String |
removeRedundantWhitespaces(java.lang.String string)
Replace whitespaces with a single space
|
static java.lang.String |
replaceLatinDerivedLetters(java.lang.String string)
Replaces non-ASCII latin derived letters with similar ASCII letters if available.
|
static java.lang.String |
replacePunctuation(java.lang.String string,
java.lang.String replaceString)
Replace punctuation (!"
|
public static java.lang.String removeDiacriticalMarks(java.lang.String string)
string
- The string to remove diacritical marks from.public static java.lang.String replaceLatinDerivedLetters(java.lang.String string)
string
- The string to replace non-ASCII letters.public static java.lang.String replacePunctuation(java.lang.String string, java.lang.String replaceString)
string
- The string to replace punctuation from.replaceString
- The string to replace the punctuation withpublic static java.lang.String removeRedundantWhitespaces(java.lang.String string)
string
- The string to replace whitespaces from.public static java.lang.String reduceToASCIILetters(java.lang.String string, boolean replaceUnsupportedChars)
string
- The string to reduce.replaceUnsupportedChars
- If true, all characters that can't be replaced with
ASCII letters will be replaced with an underscore.TV-Browser 3.4.4, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)