1 package eu.svjatoslav.commons.string;
3 public class CuttableString {
7 public CuttableString(final String value) {
12 * Cut given amount of characters from the left of the string. Return cutted
15 public String cutLeft(final int cutAmount) {
17 int actualCutAmount = cutAmount;
19 if (actualCutAmount > value.length())
20 actualCutAmount = value.length();
22 final String result = value.substring(0, actualCutAmount);
24 value = value.substring(actualCutAmount);
29 public int getLength() {
30 return value.length();
33 public String getValue() {
37 public boolean isEmpty() {
38 return value.length() == 0;