StringDext extension
Extension for String
- on
Methods
-
encode(
[Encoding encoding = utf8]) → List< int> -
Available on String, provided by the StringDext extension
Wrap the Codec.encode. -
firstLower(
) → String -
Available on String, provided by the StringDext extension
Converts the first character of string to lower case. -
firstUpper(
) → String -
Available on String, provided by the StringDext extension
Converts the first character of string to upper case. -
removePrefix(
String prefix) → String -
Available on String, provided by the StringDext extension
If the string is begins withprefix
, returns the string withoutprefix
, -
removeSuffix(
String suffix) → String -
Available on String, provided by the StringDext extension
If the string is ends withsuffix
, returns the string withoutsuffix
, -
roundToInt(
{NumberRoundType roundType = NumberRoundType.round}) → int -
Available on String, provided by the StringDext extension
Converts string to a int. -
toDateTime(
) → DateTime -
Available on String, provided by the StringDext extension
Converts string to DateTime. -
toDouble(
{int? decimalDigits, NumberRoundType roundType = NumberRoundType.round}) → double -
Available on String, provided by the StringDext extension
Converts string to a double. -
toInt(
{int radix = 10}) → int -
Available on String, provided by the StringDext extension
Converts string to an integer. -
toNaming(
{NamingType type = NamingType.lowerCamel}) → String -
Available on String, provided by the StringDext extension
Converts string to other naming convention. -
toUri(
) → Uri -
Available on String, provided by the StringDext extension
Converts string to Uri. -
toUrlEncoded(
) → String -
Available on String, provided by the StringDext extension
Convert to a uri encoded string. -
trimText(
{String? s, bool left = true, bool right = true}) → String -
Available on String, provided by the StringDext extension
Remove the prefix when theleft
is true, and remove suffix when theright
is true.