/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
/** * <p>Convert a <code>String</code> to an <code>int</code>, returning * <code>zero</code> if the conversion fails.</p> * * @param str the string to convert * @return the int represented by the string, or <code>zero</code> if * conversion fails */ public static int stringToInt(String str) { return stringToInt(str, 0); }
static public String wordWrap(String str, String width, String delim, String split) { return wordWrap(str, NumberUtils.stringToInt(width), delim, split); } /**
public void setWidths(String widths) { String[] nums = StringUtils.split(widths, ","); int sz = nums.length; this.widths = new int[sz]; for(int i=0; i<sz; i++) { if("*".equals(nums[i])) { this.widths[i] = 0; } else { this.widths[i] = NumberUtils.stringToInt(nums[i]); } } calcSizeCondition(); }