public static int countSpaceIndents(String indentString) {
        if (indentString.isEmpty()) return 0;
        if (indentString.charAt(0) == '\t') {
            return indentString.length() * TAB_SIZE;
        }
        return indentString.length();
    }
StringUtils
For dealing with specific problems related to Strings that represent text documents.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/common/StringUtils.java