Possibility to repeat string.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / string / String2.java
index 04e6489..6b36b5b 100755 (executable)
@@ -15,6 +15,15 @@ public class String2 {
         addSuffix(value);
     }
 
+    public String2 repeat(int count){
+        String value = toString();
+
+        for (int i = 1; i < count; i++) {
+            addSuffix(value);
+        }
+        return this;
+    }
+
     public String2 addPrefix(final String prefix) {
         if (prefix == null)
             return this;