Java String Multiply multiply(String original, int times)

Here you can find the source of multiply(String original, int times)

Description

multiply

License

Open Source License

Declaration

public static String multiply(String original, int times) 

Method Source Code

//package com.java2s;

public class Main {
    public static String multiply(String original, int times) {
        String s = "";

        for (int i = 0; i < times; i++) {
            s += original;//  w w w.  ja  v  a 2 s  . co  m
        }

        return s;

    }
}

Related

  1. multiply(final CharSequence str, final int factor)
  2. multiply(final String s, final Long factor)
  3. multiply(final String string, final int times)
  4. multiply(String self, int reps)
  5. multiply(String str11, String str22)
  6. multiplyString(String s, int count)
  7. multiplyString(String sourceStr, int count)