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.no setter
Methods
-
containsIgnoreCase(
String? other) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string containsotherin a case-insensitive manner. -
count(
String find) → int -
Available on String, provided by the StringAnalysisExtensions extension
Returns the number of non-overlapping occurrences offindin this string. -
endsWithAny(
List< String> find) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string ends with any character infind. -
endsWithPunctuation(
) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string ends with punctuation (.,?, or!). -
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 andotherdiffer, or an empty string if they are identical. -
hasAnyDigits(
) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returns true if this string contains any digit characters. -
isAny(
List< String> list) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string equals any item inlist. -
isEquals(
String? other, {bool ignoreCase = true, bool normalizeApostrophe = true}) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string equalsother, with options for case-insensitivity viaignoreCaseand apostrophe normalization vianormalizeApostrophe. -
isLatin(
) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returnstrueif this string contains only Latin alphabet characters (a-z, A-Z). -
isVowel(
) → bool -
Available on String, provided by the StringAnalysisExtensions extension
Returns true if this single-character string is a vowel. -
obscureText(
{String char = '•', int obscureLength = 3}) → String? -
Available on String, provided by the StringAnalysisExtensions extension
Returns an obscured version of this string usingcharrepeated, ornullif empty. -
removeInvalidUnicode(
) → String -
Available on String, provided by the StringAnalysisExtensions extension
Returns a new string with all invalid Unicode replacement characters removed. -
secondIndex(
String char) → int -
Available on String, provided by the StringAnalysisExtensions extension
Returns the index of the second occurrence ofchar, or-1if not found.