org_eclipse_lemminx_utils_StringUtilsTest_java
org.eclipse.lemminx.utils.StringUtils
public static void trimNewLines(String value, StringBuilder s) {
        int st;
        int len = value.length();
        char[] val = value.toCharArray();
        boolean hasNewLine = false;
        int start = 0;
        for (st = 0; st < len && Character.isWhitespace(val[st]); ++st) {
            if (val[st] == '\r' || val[st] == '\n') {
                hasNewLine = true;
                continue;
            }
            if (hasNewLine) break;
        }
        if (hasNewLine) {
            start = st;
            if (st > 0 && st < len && val[st - 1] == '\r' && val[st] == '\n') {
                ++start;
            }
        }
        hasNewLine = false;
        int end = len;
        while (st < len && Character.isWhitespace(val[len - 1])) {
            if (val[len - 1] == '\r' || val[len - 1] == '\n') {
                hasNewLine = true;
            } else if (hasNewLine) break;
            --len;
        }
        if (hasNewLine) {
            end = len;
            if (val[len - 1] == '\r' && val[len] == '\n') {
                --end;
            }
        }
        s.append(value, start, end);
    }
 -> java.lang.String.length(): int -> java.lang.String.toCharArray(): char[] -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.StringBuilder.append(java.lang.CharSequence,int,int): java.lang.StringBuilder
 [CALL] -> java.lang.String.length(): int -> java.lang.String.toCharArray(): char[] -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.Character.isWhitespace(char): boolean -> java.lang.StringBuilder.append(java.lang.CharSequence,int,int): java.lang.StringBuilder [EXIT]