StringSearchExtensions extension

Extension methods for string searching and matching.

on

Methods

getRepeatableLetter() String

Available on String, provided by the StringSearchExtensions extension

Returns the first character uppercased for use as a repeatable index.
isContainedInAny(List<String>? list, {bool isCaseSensitive = true}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string is contained in any item from list.
isContainsAnyInList(List<String>? list, {bool isCaseSensitive = true}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains any item from list.
isContainsAnyWord(List<String>? searchItems, {bool isCaseSensitive = false}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains any whole word from searchItems.
isContainsCaseInsensitive(String? find) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains find (case-insensitive).
isContainsConditional(String? find, {required bool condition}) bool

Available on String, provided by the StringSearchExtensions extension

Conditional contains check.
isContainsDigits() bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains any digits.
isContainsNullable(String? find, {bool isCaseSensitive = true}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains find, handling null safely.
isContainsWord(String? find, {bool isCaseSensitive = false}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string contains find as a whole word.
isEqualsAny(List<String>? list, {bool isCaseSensitive = true}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string equals any item in list.
isMatchAny(List<String>? list, {bool isCaseSensitive = true, SearchMatchType matchType = SearchMatchType.contains}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string matches any item in list using the specified matchType.
isNotContains(String? find) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string does NOT contain find.
isNotStartsWith(String? find) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string does NOT start with find.
isStartsWithAny(List<String>? list, {bool isCaseSensitive = true}) bool

Available on String, provided by the StringSearchExtensions extension

Returns true if this string starts with any item in list.
isStartsWithConditional(String? find, {required bool isPositiveSearch}) bool

Available on String, provided by the StringSearchExtensions extension

Conditional startsWith check.