Moved Org Mode support to dedicated repository and project.
[sixth.git] / src / main / java / eu / svjatoslav / sixth / core / document / Utils.java
diff --git a/src/main/java/eu/svjatoslav/sixth/core/document/Utils.java b/src/main/java/eu/svjatoslav/sixth/core/document/Utils.java
deleted file mode 100644 (file)
index 4883d1d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-package eu.svjatoslav.sixth.core.document;
-
-import eu.svjatoslav.commons.string.String2;
-
-public class Utils {
-
-    public static final char[] whitespace = new char[]{'\n', '\r', ' ', '\t'};
-
-    public static String addIndentExceptFirstLine(String input, int indent) {
-        String[] lines = input.split("\\r?\\n");
-
-        StringBuilder sb = new StringBuilder();
-
-        if (lines.length >0 ) sb.append(lines[0]);
-
-        for (int i = 1; i< lines.length; i++) {
-            sb.append("\n");
-            sb.append(new String2(" ").repeat(indent).toString());
-            sb.append(lines[i]);
-        }
-
-        return sb.toString();
-    }
-
-    public static boolean isBlank(String s){
-        for (char c : s.toCharArray())
-            if (!isWhitespaceChar(c)) return false;
-
-        return true;
-    }
-
-    /**
-     * @return line indent in characters or -1 if line is blank or empty
-     */
-    public static int getLineIndent(String line){
-        for (int i = 0; i < line.length(); i++) {
-            if (!isWhitespaceChar(line.charAt(i)))
-                return i;
-        }
-        return -1;
-    }
-
-    public static boolean isWhitespaceChar(char c){
-        for (char whitespaceChar : whitespace)
-            if (whitespaceChar == c) return true;
-
-        return false;
-    }
-
-    public static String removePrefix(String string, int charsToRemove){
-        String2 s = new String2(string);
-        s.trimPrefix(charsToRemove);
-        return s.toString();
-    }
-
-}