GrxTextSanitizer class

Utility class for text sanitization and normalization for search operations

Constructors

GrxTextSanitizer()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

advancedNormalize(String text) String
Advanced normalization that includes:
fuzzyMatches(String searchText, String targetText) bool
Performs fuzzy search by checking if all words in search text are present in target
fuzzyMatchesAny(String searchText, List<String> targetTexts) bool
Performs fuzzy search on multiple target texts
matchesAnySearch(String searchText, List<String> targetTexts) bool
Checks if search text matches any of the provided target texts
matchesSearch(String searchText, String targetText) bool
Checks if search text matches target text using normalized comparison
normalizeCountryCode(String countryCode) String
Normalizes country codes for search
normalizeForSearch(String text) String
Normalizes text for search by:
normalizePhoneNumber(String phoneNumber) String
Normalizes phone numbers for search (removes formatting)
removeDiacritics(String text) String
Removes diacritics/accents from text
sanitizeForDisplay(String text) String
Sanitizes text for display (removes potentially harmful characters)
unicodeNormalize(String text) String
Normalizes text using Unicode normalization (NFD + diacritic removal)