Commit 6418d82c authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Ported javadoc work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/branches/3_0_branch@4400 b35dd754-fafc-0310-a699-88a17e54d16e
parent aeaebc2b
......@@ -929,20 +929,19 @@ public class StringUtils {
return collection;
}
/**
* Abbreviates a string to a specified length and then adds an ellipsis
* if the input is greater than the maxWidth. Example input:
*
* <pre>
* user1@jivesoftware.com/home
*
* </pre>
* and a maximum length of 20 characters, the abbreviate method will return:
*
* <pre>
* user1@jivesoftware.c...
*
* @param str the String to abbreviate, can be null
* @param maxWidth, the maximum size of the string, minus the ellipsis
* @return abbreviated String, <code>null</code if input is null
* </pre>
* @param str the String to abbreviate.
* @param maxWidth the maximum size of the string, minus the ellipsis.
* @return the abbreviated String, or <tt>null</tt> if the string was <tt>null</tt>.
*/
public static String abbreviate(String str, int maxWidth) {
if (null == str) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment