private static char charAt(CharSequence charsSequence, int offset) {
        return charsSequence.length() > offset ? charsSequence.charAt(offset) : 0;
    }
private static char charAt(CharSequence charsSequence, int offset)