StringSignalExtension extension
Helper extensions for ReadonlySignal<String>
- on
Properties
-
codeUnits
→ List<
int> -
Available on ReadonlySignal<
An unmodifiable list of the UTF-16 code units of this string.String> , provided by the StringSignalExtension extensionno setter - isEmpty → bool
-
Available on ReadonlySignal<
Whether this string is empty.String> , provided by the StringSignalExtension extensionno setter - isNotEmpty → bool
-
Available on ReadonlySignal<
Whether this string is not empty.String> , provided by the StringSignalExtension extensionno setter - length → int
-
Available on ReadonlySignal<
The length of the string.String> , provided by the StringSignalExtension extensionno setter - runes → Runes
-
Available on ReadonlySignal<
An Iterable of Unicode code-points of this string.String> , provided by the StringSignalExtension extensionno setter
Methods
-
codeUnitAt(
int index) → int -
Available on ReadonlySignal<
Returns the 16-bit UTF-16 code unit at the givenString> , provided by the StringSignalExtension extensionindex
. -
contains(
Pattern other, [int startIndex = 0]) → bool -
Available on ReadonlySignal<
Whether this string contains a match ofString> , provided by the StringSignalExtension extensionother
. -
endsWith(
String other) → bool -
Available on ReadonlySignal<
Whether this string ends withString> , provided by the StringSignalExtension extensionother
. -
indexOf(
Pattern pattern, [int start = 0]) → int -
Available on ReadonlySignal<
Returns the position of the first match ofString> , provided by the StringSignalExtension extensionpattern
in this string, starting atstart
, inclusive: -
lastIndexOf(
Pattern pattern, [int? start]) → int -
Available on ReadonlySignal<
The starting position of the last matchString> , provided by the StringSignalExtension extensionpattern
in this string. -
padLeft(
int width, [String padding = ' ']) → String -
Available on ReadonlySignal<
Pads this string on the left if it is shorter thanString> , provided by the StringSignalExtension extensionwidth
. -
padRight(
int width, [String padding = ' ']) → String -
Available on ReadonlySignal<
Pads this string on the right if it is shorter thanString> , provided by the StringSignalExtension extensionwidth
. -
replaceAll(
Pattern from, String replace) → String -
Available on ReadonlySignal<
Replaces all substrings that matchString> , provided by the StringSignalExtension extensionfrom
withreplace
. -
replaceAllMapped(
Pattern from, String replace(Match match)) → String -
Available on ReadonlySignal<
Replace all substrings that matchString> , provided by the StringSignalExtension extensionfrom
by a computed string. -
replaceFirst(
Pattern from, String to, [int startIndex = 0]) → String -
Available on ReadonlySignal<
Creates a new string with the first occurrence ofString> , provided by the StringSignalExtension extensionfrom
replaced byto
. -
replaceFirstMapped(
Pattern from, String replace(Match match), [int startIndex = 0]) → String -
Available on ReadonlySignal<
Replace the first occurrence ofString> , provided by the StringSignalExtension extensionfrom
in this string. -
replaceRange(
int start, int? end, String replacement) → String -
Available on ReadonlySignal<
Replaces the substring fromString> , provided by the StringSignalExtension extensionstart
toend
withreplacement
. -
split(
Pattern pattern) → List< String> -
Available on ReadonlySignal<
Splits the string at matches ofString> , provided by the StringSignalExtension extensionpattern
and returns a list of substrings. -
splitMapJoin(
Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) → String -
Available on ReadonlySignal<
Splits the string, converts its parts, and combines them into a new string.String> , provided by the StringSignalExtension extension -
startsWith(
Pattern pattern, [int index = 0]) → bool -
Available on ReadonlySignal<
Whether this string starts with a match ofString> , provided by the StringSignalExtension extensionpattern
. -
substring(
int start, [int? end]) → String -
Available on ReadonlySignal<
The substring of this string fromString> , provided by the StringSignalExtension extensionstart
, inclusive, toend
, exclusive. -
toLowerCase(
) → String -
Available on ReadonlySignal<
Converts all characters in this string to lower case.String> , provided by the StringSignalExtension extension -
toUpperCase(
) → String -
Available on ReadonlySignal<
Converts all characters in this string to upper case.String> , provided by the StringSignalExtension extension -
trim(
) → String -
Available on ReadonlySignal<
The string without any leading and trailing whitespace.String> , provided by the StringSignalExtension extension -
trimLeft(
) → String -
Available on ReadonlySignal<
The string without any leading whitespace.String> , provided by the StringSignalExtension extension -
trimRight(
) → String -
Available on ReadonlySignal<
The string without any trailing whitespace.String> , provided by the StringSignalExtension extension
Operators
-
operator *(
int times) → String -
Available on ReadonlySignal<
Creates a new string by concatenating this string with itself a number of times.String> , provided by the StringSignalExtension extension -
operator +(
String other) → String -
Available on ReadonlySignal<
Creates a new string by concatenating this string withString> , provided by the StringSignalExtension extensionother
. -
operator [](
int index) → String -
Available on ReadonlySignal<
The character (as a single-code-unit String) at the givenString> , provided by the StringSignalExtension extensionindex
.