Class CharacterChecker
java.lang.Object
io.github.sergeloie.languagecheck.check.CharacterChecker
Scans the decoded text of one file against a
CharPolicy.
Stateless: a single instance can check any number of files. Line
counting is 1-based; only '\n' advances the line counter, so
both LF and CRLF files report correct line numbers.
'\r' itself is allowed ASCII and is skipped without advancing
the line. Lone surrogates are reported as violations at their own code
point value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck(String text, CharPolicy policy, int maxSamples) Checktextagainstpolicy.
-
Constructor Details
-
CharacterChecker
public CharacterChecker()
-
-
Method Details
-
check
Checktextagainstpolicy.- Parameters:
maxSamples- maximum number of detailedViolations to collect (0collects none; the total is still counted exactly)
-