static int indexOfNonWhitespace()

in src/main/java/org/apache/commons/cli/help/Util.java [51:61]


    static int indexOfNonWhitespace(final CharSequence text, final int startPos) {
        if (isEmpty(text)) {
            return NOT_FOUND;
        }
        // the line ends before the max wrap pos or a new line char found
        int idx = startPos;
        while (idx < text.length() && isWhitespace(text.charAt(idx))) {
            idx++;
        }
        return idx < text.length() ? idx : NOT_FOUND;
    }