List of utility methods to do String Format
String | getTextAsFormattedLines(String text, int lineLength) Given a chunk of text format it so that you return a new String with the line length equal to that passed in. StringBuffer retdata = new StringBuffer(); List lines = new ArrayList(); String t = new String(text); while (t.length() > lineLength) { String s = t.substring(0, lineLength); String rest = t.substring(lineLength); int lastInd = s.lastIndexOf(' '); if (lastInd == (lineLength)) { ... |
ImageWriter | getWriterByFormat(final String format) get Writer By Format final Iterator<ImageWriter> iter = ImageIO.getImageWritersByFormatName(format); if (iter.hasNext()) { return iter.next(); } else { throw new IllegalArgumentException("Image format [" + format + "] is not supported"); |
boolean | isDurationFormatPattern(String formatPattern) Determine if the duration format pattern is valid. if (formatPattern == null) { return false; final int length = formatPattern.length(); if (length < 2) { return false; formatPattern = formatPattern.toLowerCase(); ... |
boolean | isQueryInFormat(String in) is Query In Format if (in == null || in.isEmpty()) { return true; String[] ins = in.split(","); return INS.containsAll(Arrays.asList(ins)); |
String | str(final String messageFormat, final Object... args) Convenience shortcut for MessageFormat#format(String,Object) . return MessageFormat.format(messageFormat, args);
|
String | StrFormat(String pattern, Object... arguments) Str Format Object argumentStr[] = new String[arguments.length]; for (int i = 0; i < argumentStr.length; i++) { argumentStr[i] = arguments[i].toString(); return MessageFormat.format(pattern, argumentStr); |
String | stringFormat(String pattern, Object[] arguments) add by chen yong 2007-2-5 samples: 1. return MessageFormat.format(pattern, arguments);
|
String | stringFormat(String textPattern, Object... args) Formats the given String of text using the String#format(String,Object) method. return String.format(textPattern, args);
|