|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.util.string.StringUtil
public final class StringUtil
This class provides String utils.
| Method Summary | |
|---|---|
static boolean |
checkAccentuatedCharacter(java.lang.String strString)
This function checks if an string is in a valid format Returns true if the string is valid |
static boolean |
checkCodeKey(java.lang.String strCodeKey)
Check a code key. |
static boolean |
checkEmail(java.lang.String strEmail)
This function checks if an email is in a valid format Returns true if the email is valid |
static boolean |
containsHtmlSpecialCharacters(java.lang.String strValue)
Checks if a string literal contains any HTML special characters (&, ", ' <, >). |
static boolean |
containsXssCharacters(java.lang.String strValue)
Checks if a String contains characters that could be used for a cross-site scripting attack. |
static boolean |
containsXssCharacters(java.lang.String strValue,
char[] aXssCharacters)
Checks if a String contains characters that could be used for a cross-site scripting attack. |
static boolean |
containsXssCharacters(java.lang.String strValue,
java.lang.String strXssCharacters)
Checks if a String contains characters that could be used for a cross-site scripting attack. |
static int |
getIntValue(java.lang.String strValue,
int nDefaultValue)
Converts strValue to an int value. |
static java.lang.String |
getXssCharactersAsString()
Simple convenience method to return the XSS characters as a string, to include it in error messages. |
static java.lang.String |
replaceAccent(java.lang.String strInit)
This function converts French diacritics characters into non diacritics. |
static java.lang.String |
substitute(java.lang.String strSource,
java.lang.String strValue,
java.lang.String strBookmark)
This function substitutes all occurences of a given bookmark by a given value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String substitute(java.lang.String strSource,
java.lang.String strValue,
java.lang.String strBookmark)
strSource - The input string that contains bookmarks to replacestrValue - The value to substitute to the bookmarkstrBookmark - The bookmark name
public static java.lang.String replaceAccent(java.lang.String strInit)
strInit - The String to convert
public static boolean containsHtmlSpecialCharacters(java.lang.String strValue)
strValue - The string literal to check
public static boolean containsXssCharacters(java.lang.String strValue)
strValue - a character String
public static boolean containsXssCharacters(java.lang.String strValue,
char[] aXssCharacters)
strValue - a character StringaXssCharacters - a Xss characters tab to check in strValue
public static boolean containsXssCharacters(java.lang.String strValue,
java.lang.String strXssCharacters)
strValue - a character StringstrXssCharacters - a String wich contain a list of Xss characters to check in strValue
public static java.lang.String getXssCharactersAsString()
public static boolean checkEmail(java.lang.String strEmail)
strEmail - The mail to check
public static boolean checkAccentuatedCharacter(java.lang.String strString)
strString - The string to check
public static boolean checkCodeKey(java.lang.String strCodeKey)
strCodeKey - The code Key
public static int getIntValue(java.lang.String strValue,
int nDefaultValue)
strValue to an int value.
strValue - the value to convertnDefaultValue - the default returned value
strValue int value, nDefaultValue if strValue is not an Integer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||