org.jopendocument.util
Class StringUtils
java.lang.Object
org.jopendocument.util.StringUtils
public class StringUtils
- extends Object
- Author:
- Sylvain CUAZ
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UTF8
public static final Charset UTF8
UTF16
public static final Charset UTF16
ASCII
public static final Charset ASCII
ISO8859_1
public static final Charset ISO8859_1
Cp1252
public static final Charset Cp1252
Cp850
public static final Charset Cp850
StringUtils
public StringUtils()
firstUpThenLow
public static String firstUpThenLow(String s)
- Retourne la chaine avec la première lettre en majuscule et le reste en minuscule.
- Parameters:
s
- la chaîne à transformer.
- Returns:
- la chaine avec la première lettre en majuscule et le reste en minuscule.
firstUp
public static String firstUp(String s)
getLeastMaximum
public static final int getLeastMaximum()
- The minimum value for
getBoundedLengthString(String, int)
.
- Returns:
- the minimum value for
maxLength
.
getBoundedLengthString
public static final String getBoundedLengthString(String s,
int maxLength)
throws IllegalArgumentException
- Return a string built from
s
that is at most maxLength
long.
- Parameters:
s
- the string to bound.maxLength
- the maximum length the result must have.
- Returns:
- a string built from
s
.
- Throws:
IllegalArgumentException
- if maxLength
is too small.- See Also:
getLeastMaximum()
,
StringUtils.Shortener.getBoundedLengthString(String, int)
fastSplit
public static final List<String> fastSplit(String string,
char sep)
splitString
public static String splitString(String s,
int nbCharMaxLine)
- Split une string s tous les nbCharMaxLine
- Parameters:
s
- nbCharMaxLine
-
- Returns:
doubleQuote
public static String doubleQuote(String s)
rightAlign
public static String rightAlign(String s,
int width)
leftAlign
public static String leftAlign(String s,
int width)
trim
public static String trim(String s,
boolean leading)
Copyright © 2010 jOpenDocument All Rights Reserved.