MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / get_case_folding_rules

Function get_case_folding_rules

scripts/test_helpers.py:130–140  ·  view source on GitHub ↗

Download and parse Unicode CaseFolding.txt, caching in temp directory. Args: version: Unicode version string (e.g., "17.0.0") Returns: Dict mapping codepoints to their folded UTF-8 bytes

(version: str = UNICODE_VERSION)

Source from the content-addressed store, hash-verified

128
129
130def get_case_folding_rules(version: str = UNICODE_VERSION) -> Dict[int, bytes]:
131 """Download and parse Unicode CaseFolding.txt, caching in temp directory.
132
133 Args:
134 version: Unicode version string (e.g., "17.0.0")
135
136 Returns:
137 Dict mapping codepoints to their folded UTF-8 bytes
138 """
139 cache_path = _download_case_folding_file(version)
140 return parse_case_folding_file(cache_path)
141
142
143def get_case_folding_rules_as_codepoints(

Callers

nothing calls this directly

Calls 2

parse_case_folding_fileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…