org.fedorahosted.tennera.antgettext
Class StringUtil
java.lang.Object
org.fedorahosted.tennera.antgettext.StringUtil
public class StringUtil
- extends java.lang.Object
String utilities and i18n pseudolocalization from the JBoss Ant-Gettext utilities.
For the JSettlers project, retrieved 2013-09-10 from
https://github.com/zanata/tennera/blob/master/ant-gettext/src/main/java/org/fedorahosted/tennera/antgettext/StringUtil.java
Retrieved version was last modified 2009-05-05, LGPL license.
Changes for JSettlers:
- 2013-09-12 jeremy Make class and removeFileExtension public;
pseudolocalise: shorten prefix, suffix to
"[-- ", " --]"
,
don't pseudo any text within {curly brackets}
- 2013-09-22 jeremy Allow null param to pseudolocalise: returns null.
Method Summary |
static java.lang.String |
chomp(java.lang.String input)
|
static void |
chomp(java.lang.StringBuilder sb)
|
private static void |
chopIfMatch(java.lang.StringBuilder sb,
char ch)
|
(package private) static boolean |
equals(java.lang.String a,
java.lang.String b)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
pseudolocalise(java.lang.String text)
|
static java.lang.String |
removeFileExtension(java.lang.String filename,
java.lang.String extension)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
alphabetEnglish
private static final java.lang.String alphabetEnglish
- See Also:
- Constant Field Values
alphabetMunged
private static final java.lang.String alphabetMunged
- See Also:
- Constant Field Values
codepointsMunged
private static final int[] codepointsMunged
StringUtil
public StringUtil()
pseudolocalise
public static java.lang.String pseudolocalise(java.lang.String text)
chomp
public static void chomp(java.lang.StringBuilder sb)
chopIfMatch
private static void chopIfMatch(java.lang.StringBuilder sb,
char ch)
chomp
public static java.lang.String chomp(java.lang.String input)
removeFileExtension
public static java.lang.String removeFileExtension(java.lang.String filename,
java.lang.String extension)
equals
static boolean equals(java.lang.String a,
java.lang.String b)
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception