ObjStringExt extension

on

Properties

codeUnits → List<int>

Available on Obj<String>, provided by the ObjStringExt extension

An unmodifiable list of the UTF-16 code units of this string.
no setter
isEmpty → bool

Available on Obj<String>, provided by the ObjStringExt extension

Whether this string is empty.
no setter
isNotEmpty → bool

Available on Obj<String>, provided by the ObjStringExt extension

Whether this string is not empty.
no setter
length → int

Available on Obj<String>, provided by the ObjStringExt extension

The length of the string.
no setter
runes → Runes

Available on Obj<String>, provided by the ObjStringExt extension

An Iterable of Unicode code-points of this string.
no setter

Methods

codeUnitAt(int index) → int

Available on Obj<String>, provided by the ObjStringExt extension

Returns the 16-bit UTF-16 code unit at the given index.
compareTo(String other) → int

Available on Obj<String>, provided by the ObjStringExt extension

Compares this string to other.
contains(Pattern other, [int startIndex = 0]) → bool

Available on Obj<String>, provided by the ObjStringExt extension

Whether this string contains a match of other.
endsWith(String other) → bool

Available on Obj<String>, provided by the ObjStringExt extension

Whether this string ends with other.
indexOf(Pattern pattern, [int start = 0]) → int

Available on Obj<String>, provided by the ObjStringExt extension

Returns the position of the first match of pattern in this string, starting at start, inclusive:
lastIndexOf(Pattern pattern, [int? start]) → int

Available on Obj<String>, provided by the ObjStringExt extension

The starting position of the last match pattern in this string.
padLeft(int width, [String padding = ' ']) → String

Available on Obj<String>, provided by the ObjStringExt extension

Pads this string on the left if it is shorter than width.
padRight(int width, [String padding = ' ']) → String

Available on Obj<String>, provided by the ObjStringExt extension

Pads this string on the right if it is shorter than width.
replaceAll(Pattern from, String replace) → String

Available on Obj<String>, provided by the ObjStringExt extension

Replaces all substrings that match from with replace.
replaceAllMapped(Pattern from, String replace(Match match)) → String

Available on Obj<String>, provided by the ObjStringExt extension

Replace all substrings that match from by a computed string.
replaceFirst(Pattern from, String to, [int startIndex = 0]) → String

Available on Obj<String>, provided by the ObjStringExt extension

Creates a new string with the first occurrence of from replaced by to.
replaceFirstMapped(Pattern from, String replace(Match match), [int startIndex = 0]) → String

Available on Obj<String>, provided by the ObjStringExt extension

Replace the first occurrence of from in this string.
replaceRange(int start, int? end, String replacement) → String

Available on Obj<String>, provided by the ObjStringExt extension

Replaces the substring from start to end with replacement.
split(Pattern pattern) → List<String>

Available on Obj<String>, provided by the ObjStringExt extension

Splits the string at matches of pattern and returns a list of substrings.
splitMapJoin(Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) → String

Available on Obj<String>, provided by the ObjStringExt extension

Splits the string, converts its parts, and combines them into a new string.
startsWith(Pattern pattern, [int index = 0]) → bool

Available on Obj<String>, provided by the ObjStringExt extension

Whether this string starts with a match of pattern.
substring(int start, [int? end]) → String

Available on Obj<String>, provided by the ObjStringExt extension

The substring of this string from start, inclusive, to end, exclusive.
toLowerCase() → String

Available on Obj<String>, provided by the ObjStringExt extension

Converts all characters in this string to lower case.
toUpperCase() → String

Available on Obj<String>, provided by the ObjStringExt extension

Converts all characters in this string to upper case.
trim() → String

Available on Obj<String>, provided by the ObjStringExt extension

The string without any leading and trailing whitespace.
trimLeft() → String

Available on Obj<String>, provided by the ObjStringExt extension

The string without any leading whitespace.
trimRight() → String

Available on Obj<String>, provided by the ObjStringExt extension

The string without any trailing whitespace.

Operators

operator *(int times) → String

Available on Obj<String>, provided by the ObjStringExt extension

Creates a new string by concatenating this string with itself a number of times.
operator +(Obj<String> other) → String

Available on Obj<String>, provided by the ObjStringExt extension

Creates a new string by concatenating this string with other.
operator [](int index) → String

Available on Obj<String>, provided by the ObjStringExt extension

The character (as a single-code-unit String) at the given index.