StringExt1 extension
- on
Properties
- nullIfEmpty → String?
-
Available on String, provided by the StringExt1 extension
Returns null if the String is empty, otherwise returns the String.no setter
Methods
-
replaceLast(
Pattern from, String replace, [int startIndex = 0]) → String -
Available on String, provided by the StringExt1 extension
Replaces the last occurrence offromwithreplacestarting atstartIndex. -
splitByLastOccurrenceOf(
String separator) → List< String> -
Available on String, provided by the StringExt1 extension
-
truncToLength(
int length, {String ellipsis = ''}) → String -
Available on String, provided by the StringExt1 extension
Truncates the string to the givenlength, trimming trailing whitespace that may be exposed by the cut, and appendingellipsisif and only if the string was actually truncated. -
withNormalizedWhitespace(
[String replace = ' ']) → String -
Available on String, provided by the StringExt1 extension
Replaces all whitespace characters withreplace.