StringExtensions extension
- on
Properties
- last → String
-
Available on String?, provided by the StringExtensions extension
Returns last symbol of string or empty string ifthisis null or emptyno setter
Methods
-
anyChar(
bool predicate(String element)) → bool -
Available on String?, provided by the StringExtensions extension
Returnstrueif at least one element matches the givenpredicate. thepredicateshould have only one character -
containsIgnoreCase(
String? other) → bool -
Available on String?, provided by the StringExtensions extension
Returnstrueif string contains another without matching case -
equalsIgnoreCase(
String? other) → bool -
Available on String?, provided by the StringExtensions extension
Returnstrueif strings are equals without matching case -
isNotNullOrEmpty(
) → bool -
Available on String?, provided by the StringExtensions extension
Returnsfalseif this nullable char sequence is eithernullor empty. -
isNullOrEmpty(
) → bool -
Available on String?, provided by the StringExtensions extension
Returnstrueif this nullable char sequence is eithernullor empty. -
replaceAfter(
String delimiter, String replacement, [String? defaultValue]) → String? -
Available on String?, provided by the StringExtensions extension
Replaces part of string after the first occurrence of given delimiter with thereplacementstring. If the string does not contain the delimiter, returnsdefaultValuewhich defaults to the original string. -
replaceBefore(
String delimiter, String replacement, [String? defaultValue]) → String? -
Available on String?, provided by the StringExtensions extension
Replaces part of string before the first occurrence of given delimiter with thereplacementstring. If the string does not contain the delimiter, returnsmissingDelimiterValue!which defaults to the original string. -
reversed(
) → String -
Available on String?, provided by the StringExtensions extension
Returns a progression that goes over the same range in the opposite direction with the same step. -
toBoolean(
) → bool -
Available on String?, provided by the StringExtensions extension
Returns true if 'this' is "true", otherwise - false -
toDouble(
) → double -
Available on String?, provided by the StringExtensions extension
Returns the value of this number as an double -
toDoubleOrNull(
) → double? -
Available on String?, provided by the StringExtensions extension
Returns the value of this number as an double or null if can not be parsed. -
toInt(
) → int -
Available on String?, provided by the StringExtensions extension
Returns the value of this number as an int -
toIntOrNull(
) → int? -
Available on String?, provided by the StringExtensions extension
Returns the value of this number as an int or null if can not be parsed.