src/org/nutz/lang/Strings.java
public static String dup(CharSequence cs, int num) {
        if (isEmpty(cs) || num <= 0)
            return "";
        StringBuilder sb = new StringBuilder(cs.length() * num);
        for (int i = 0; i < num; i++)
            sb.append(cs);
        return sb.toString();
    }
public static String dup(CharSequence cs, int num) {
        if (isEmpty(cs) || num <= 0)
            return "";
        StringBuilder sb = new StringBuilder(cs.length() * num);
        for (int i = 0; i < num; i++)
            sb.append(cs);
        return sb.toString();
    }
public static String dup ( CharSequence cs , int num ) { if ( isEmpty ( cs ) || num <= 0 ) return "" ; StringBuilder sb = new StringBuilder ( cs . length ( ) * num ) ; for ( int i = 0 ; i < num ; i ++ ) sb . append ( cs ) ; return sb . toString ( ) ; }
复制字符串

@param cs
字符串
@param num
数量
@return 新字符串
复制字符串