MiscUtilsOnStringX extension
- on
Methods
-
replaceLast(
Pattern from, String replace, [int startIndex = 0]) → String -
Available on String, provided by the MiscUtilsOnStringX extension
Replaces the last occurrence offrom
withreplace
starting atstartIndex
. -
splitByLastOccurrenceOf(
String separator) → List< String> -
Available on String, provided by the MiscUtilsOnStringX extension
-
truncToLength(
int length, {String ellipsis = ''}) → String -
Available on String, provided by the MiscUtilsOnStringX extension
Truncates the string to the givenlength
. Specifyellipsis
to append to he truncated string if it is shorter thanlength
, e.g. 'Hello World'.truncToLength(5, ellipsis: '...') => 'Hello...'. -
withNormalizedWhitespace(
[String replace = ' ']) → String -
Available on String, provided by the MiscUtilsOnStringX extension
Replaces all whitespace characters withreplace
.