List of usage examples for org.apache.commons.lang.math NumberUtils stringToInt
public static int stringToInt(String str)
Convert a String to an int, returning zero if the conversion fails.
If the string is null, zero is returned.
NumberUtils.stringToInt(null) = 0 NumberUtils.stringToInt("") = 0 NumberUtils.stringToInt("1") = 1 From source file:org.apache.roller.weblogger.ui.tags.LeftTag.java
public String changeString(String text) throws JspException { return StringUtils.left(text, NumberUtils.stringToInt(count)); }
From source file:org.apache.roller.weblogger.ui.tags.TruncateNicelyTag.java
public String changeString(String text) throws JspException { int l = NumberUtils.stringToInt(lower); int u = NumberUtils.stringToInt(upper); return StringW.truncateNicely(text, l, u, this.appendToEnd); }
From source file:org.apache.roller.weblogger.ui.tags.WordWrapTag.java
public String changeString(String text) throws JspException { return StringW.wordWrap(text, NumberUtils.stringToInt(width), delimiter, split, delimiterInside); }