StringExtension extension

Extension for String.

on

Methods

containsAny(Iterable<String> others) bool
Returns true if this String contains any element of others.
headEquals(String other, {List<int>? splitIndexes, bool splitIndexesAlreadySorted = false}) String
Returns this String head part that is equals to other.
headEqualsLength(String other) int
Returns the length of the head that is equals to the head of other.
splitColumns({Pattern delimiter = ',', bool acceptsQuotedValues = true}) List<String>
Splits this String in columns.
splitLines({RegExp? lineDelimiter, bool trimLines = true, bool removeEmptyLines = true, StringFilterFunction? filter}) List<String>
Splits this String lines.
tailDifferent(String other, {List<int>? splitIndexes, bool splitIndexesAlreadySorted = false}) String
Returns this String tail removing the head part that is equals to other.
tailEqualsLength(String other) int
Returns the length of the tail that is equals to the tail of other.
truncate(int maxLength, {String suffix = '!...'}) String
Truncates this String if necessary, appending suffix at the end.