| |||||||
| FRAMES NO FRAMES | |||||||
<%@ taglib prefix="su" uri="http://openutils.sf.net/openutils-stringutils" %>
<anyxmlelement xmlns:su="http://openutils.sf.net/openutils-stringutils" />
Openutils EL functions: stringutils
| Tag Library Information | |
| Display Name | stringutils |
| Version | 1.0 |
| Short Name | su |
| URI | http://openutils.sf.net/openutils-stringutils |
| Function Summary | ||
java.lang.String | capitaliseAllWords( java.lang.String) | Capitalizes all the whitespace separated words in a String. Only the first letter of each word is changed. |
java.lang.String | substringAfterLast( java.lang.String, java.lang.String) | Gets the substring after the last occurrence of a separator. The separator is not returned. The function takes 2 parameters:
java.lang.String: the String to get a substring from, may be null java.lang.String: the String to search for, may be null |
java.lang.String | substringBeforeLast( java.lang.String, java.lang.String) | Gets the substring before the last occurrence of a separator. The separator is not returned. The function takes 2 parameters:
java.lang.String: the String to get a substring from, may be null java.lang.String: the String to search for, may be null |
boolean | isBlank( java.lang.String ) | Checks if a String is whitespace, empty ("") or null. |
java.lang.String | randomAlphanumeric( int) | Creates a random string whose length is the number of characters specified. |
int | randomInt( int) | Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), from the Math.random() sequence. |
java.lang.String | unescapeXml( java.lang.String) | Unescapes a String |
java.lang.String | space( ) | Output a white space. |
java.lang.String | tab( ) | Output a tab character. |
java.lang.String | newline( ) | Output a newline character. |
java.lang.String | escJsTxt( java.lang.String, boolean) | Escapes a javascript string. If "true" is passed as parameter, the string is between ", if false is bewteen ' |
java.lang.String | adaptStringLength( java.lang.String, int, java.lang.String) | Crops a String to a given length, adding a suffix (for example "...") if needed. The function takes 3 parameters:
java.lang.String: the string to be adapted int: the number of chars of the string to be kept java.lang.String: the suffix to be added if the string is not complete |
java.lang.String | stripHtmlTags( java.lang.String) | Strip any html tag from a String. |
java.lang.String[] | splitNewlines( java.lang.String) | Splits the given strings on newlines |
java.lang.String[] | splitOnTabs( java.lang.String) | Splits the given string on tab characters |
java.lang.String | strip( java.lang.String) | Strips whitespaces from the start and the end of a String |
java.lang.String | defaultIfEmpty( java.lang.String, java.lang.String) | Returns either the passed in String, or if the String is empty or null, the value of defaultStr. The function takes 2 parameters:
java.lang.String: the String to check, may be null java.lang.String: the default String to return if the string to check is null of empty |
boolean | endsWith( java.lang.String, java.lang.String) | A wrapper around java.lang.String#endsWith(..). Tests if this string ends with the specified suffix. The function takes 2 parameters:
java.lang.String: string to evaluate java.lang.String: suffix |
java.lang.String | shorten( java.lang.String, int, int, java.lang.String) | Shorten a text with a number of lines and a number of chars per line to be displayed. Display ellipses the line is shortened. The function takes 4 parameters:
java.lang.String: original text int: number of lines int: number of chars per line java.lang.String: optional ellipses ('...') to display optional ellipses where the line is shortened. |
java.lang.Long | toLong( java.lang.String) | Parse a number, passed as String, and return his Long |
java.lang.Long | toRoundedLong( java.lang.String) | Parse a number, passed as String, and return his closest rounding as a long (or 0L if parse fails) |
java.lang.Long | toFloorLong( java.lang.String) | Parse a double, passed as String, and return his floor as a long (or 0L if parse fails) |
java.lang.Long | toCeilLong( java.lang.String) | Parse a double, passed as String, and return his ceil as a long (or 0L if parse fails) |
java.lang.String | urlencode( java.lang.String) | Enconde a url in UTF-8 format |
java.lang.String | urldecode( java.lang.String) | Decode a url in UTF-8 format |
| |||||||
| FRAMES NO FRAMES | |||||||