private static boolean boundsCheck(final String text, final int index, final int length) {
    return index + length < text.length();
  }
Returns {@code true} if it's okay to check for characters up to the given length. Returns {@code false} if the
string is too short.

@param text The string to check.
@param index The index to start from.
@param length The length to check.
@return {@code true} if the string's length is at least as long as {@code index + length}.
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/internal/parser/TokenParser.java