Possibility to add separator prefixed suffixes.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 14 Nov 2017 13:54:31 +0000 (15:54 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 14 Nov 2017 13:54:31 +0000 (15:54 +0200)
src/main/java/eu/svjatoslav/commons/string/String2.java

index 4c1627f..2e9446a 100755 (executable)
@@ -46,6 +46,14 @@ public class String2 {
         return this;
     }
 
+    public String2 addSuffix(String separator, final String suffix) {
+        if (!isEmpty())
+            addSuffix(separator);
+
+        addSuffix(suffix);
+
+        return this;
+    }
     /**
      * Cut given amount of characters from the left of the string.
      *