Class CharacterNameQuery

java.lang.Object
com.ibm.icu.impl.CharacterNameQuery

class CharacterNameQuery extends Object
For a character name name, a query string query matches name under UAX44-LM2 if and only if the following returns true:
    final var matcher = new CharacterNameQuery(query).matcher();
    for (final char c : name) {
        if (!matcher.consistentWith(c)) {
            return false;
        }
    }

    return matcher.matches();
name must be an exact character name, in particular, all uppercase, with no underscores, no double hyphens, no isolated hyphens. There are no constraints on query; for instance, this class will match name="ZANABAZAR SQUARE LETTER -A" with query="Zanabazar-square_letter_-A". Matcher::consistentWith is not retryable: once it returns false, the Matcher should not be used again.
  • Field Details

  • Constructor Details

    • CharacterNameQuery

      CharacterNameQuery(CharSequence query)
  • Method Details