StringAnalysisExtensions extension

Extensions on String for validation, comparison, and analysis.

on

Properties

hasInvalidUnicode bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string contains invalid Unicode characters. Audited: 2026-06-12 11:26 EDT
no setter

Methods

containsIgnoreCase(String? other) bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string contains other in a case-insensitive manner.
count(String find) int

Available on String, provided by the StringAnalysisExtensions extension

Returns the number of non-overlapping occurrences of find in this string.
endsWithAny(List<String> find) bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string ends with any character in find. Audited: 2026-06-12 11:26 EDT
endsWithPunctuation() bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string ends with punctuation (., ?, or !). Audited: 2026-06-12 11:26 EDT
extractCurlyBraces() List<String>?

Available on String, provided by the StringAnalysisExtensions extension

Extracts all text within curly braces from this string.
getFirstDiffChar(String other) String

Available on String, provided by the StringAnalysisExtensions extension

Returns the first character where this string and other differ, or an empty string if they are identical. Audited: 2026-06-12 11:26 EDT
hasAnyDigits() bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string contains any digit characters. Audited: 2026-06-12 11:26 EDT
isAny(List<String> list) bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string equals any item in list. Audited: 2026-06-12 11:26 EDT
isEquals(String? other, {bool ignoreCase = true, bool normalizeApostrophe = true}) bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string equals other, with options for case-insensitivity via ignoreCase and apostrophe normalization via normalizeApostrophe. Audited: 2026-06-12 11:26 EDT
isLatin() bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this string contains only Latin alphabet characters (a-z, A-Z). Audited: 2026-06-12 11:26 EDT
isVowel() bool

Available on String, provided by the StringAnalysisExtensions extension

Returns true if this single-character string is a vowel. Audited: 2026-06-12 11:26 EDT
obscureText({String char = '•', int obscureLength = 3}) String?

Available on String, provided by the StringAnalysisExtensions extension

Returns an obscured version of this string using char repeated, or null if empty.
removeInvalidUnicode() String

Available on String, provided by the StringAnalysisExtensions extension

Returns a new string with all invalid Unicode replacement characters removed. Audited: 2026-06-12 11:26 EDT
secondIndex(String char) int

Available on String, provided by the StringAnalysisExtensions extension

Returns the index of the second occurrence of char, or -1 if not found. Audited: 2026-06-12 11:26 EDT