libscid snapshot+b450b7969924
Chess applications made easy.
Source on GitHub License GPL v2
Loading...
Searching...
No Matches
Name Normalization

Name normalization is the general rewrite layer in a spelling file. It is not alias lookup: NameNormalizer applies section-local Prefix, Infix and Suffix rules directly to a mutable string and reports how many substitutions it made.

The rules are byte-exact and case-sensitive. Prefix and suffix normalization stop after the first matching rule in their respective lists; infix normalization replaces every occurrence of each loaded fragment.

Domain Model

The normalizer stores three ordered rule lists. Each rule is a quoted pair from the spelling file: source fragment and replacement fragment. The public addPrefix(), addInfix() and addSuffix() methods parse those quoted pairs and return a Core error code when the directive is malformed.