StringUtility extension
Utility for Strings.
- on
Properties
- nullIfWhitespace → String?
-
Available on String, provided by the StringUtility extension
Returns null if this string is whitespace.no setter
Methods
-
extractJson(
[String separator = '']) → Map< String, dynamic> ? -
Available on String, provided by the StringUtility extension
Extract and decode json from a string -
parseDateTime(
) → DateTime -
Available on String, provided by the StringUtility extension
-
parseViewCount(
) → int? -
Available on String, provided by the StringUtility extension
Parse view count from a string formatted as an integer and its magnitude. Example: 5 views, 1.5K views, 2.3M views, 3.4B views. If this fails returns null. -
stripNonDigits(
) → String -
Available on String, provided by the StringUtility extension
Strips out all non digit characters. -
substringAfter(
String separator) → String -
Available on String, provided by the StringUtility extension
-
substringUntil(
String separator) → String -
Available on String, provided by the StringUtility extension
Returns null if this string is a whitespace. -
toDuration(
) → Duration? -
Available on String, provided by the StringUtility extension
Format: HH:MM:SS