StringExtension extension
- on
Properties
- last → String
-
Available on String?, provided by the StringExtension extension
Returns last symbol of string or empty string ifthis
is null or emptyno setter
Methods
-
anyChar(
bool predicate(String element)) → bool -
Available on String?, provided by the StringExtension extension
Returnstrue
if at least one element matches the givenpredicate
. thepredicate
should have only one character -
capitalize(
) → String -
Available on String?, provided by the StringExtension extension
Capitalize the first string If the string is null or empty return default string. -
containsIgnoreCase(
String? other) → bool -
Available on String?, provided by the StringExtension extension
Returnstrue
if string contains another without matching case -
equalsIgnoreCase(
String? other) → bool -
Available on String?, provided by the StringExtension extension
Returnstrue
if strings are equals without matching case -
isNotNullOrEmpty(
) → bool -
Available on String?, provided by the StringExtension extension
Returnsfalse
if this nullable char sequence is eithernull
or empty. -
isNullOrEmpty(
) → bool -
Available on String?, provided by the StringExtension extension
Returnstrue
if this nullable char sequence is eithernull
or empty. -
removeLast(
) → String -
Available on String?, provided by the StringExtension extension
remove last String If the string is null or empty return default string. -
replaceAfter(
String delimiter, String replacement, [String? defaultValue]) → String? -
Available on String?, provided by the StringExtension extension
Replaces part of string after the first occurrence of given delimiter with thereplacement
string. If the string does not contain the delimiter, returnsdefaultValue
which defaults to the original string. -
replaceBefore(
String delimiter, String replacement, [String? defaultValue]) → String? -
Available on String?, provided by the StringExtension extension
Replaces part of string before the first occurrence of given delimiter with thereplacement
string. If the string does not contain the delimiter, returnsmissingDelimiterValue!
which defaults to the original string. -
replaceLast(
String substring, String replacement) → String -
Available on String?, provided by the StringExtension extension
Replace last String withreplacement
string. If the string is null or empty return default string. -
reversed(
) → String -
Available on String?, provided by the StringExtension extension
Returns a progression that goes over the same range in the opposite direction with the same step. -
toDouble(
) → double -
Available on String?, provided by the StringExtension extension
Returns the value of this number as an double -
toDoubleOrNull(
) → double? -
Available on String?, provided by the StringExtension 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 StringExtension extension
Returns the value of this number as an int -
toIntOrNull(
) → int? -
Available on String?, provided by the StringExtension extension
Returns the value of this number as an int or null if can not be parsed.