StringSignalExtension#
Kind:
extension |
Package: package:signals_core
Extension: StringSignalExtension#
extension StringSignalExtension on ReadonlySignal<String>
Helper extensions for ReadonlySignal
Members of StringSignalExtension#
| Member | Type | Signature | Description |
|---|---|---|---|
| [] | method |
dart String [](int index) |
The character (as a single-code-unit String) at the given index. |
| codeUnitAt | method |
dart int codeUnitAt(int index) |
Returns the 16-bit UTF-16 code unit at the given index. |
| length | method |
dart int length |
The length of the string. |
| endsWith | method |
dart bool endsWith(String other) |
Whether this string ends with other. |
| startsWith | method |
dart bool startsWith(Pattern pattern, [int index = 0]) |
Whether this string starts with a match of pattern. |
| indexOf | method |
dart int indexOf(Pattern pattern, [int start = 0]) |
Returns the position of the first match of pattern in this string, |
| lastIndexOf | method |
dart int lastIndexOf(Pattern pattern, [int? start]) |
The starting position of the last match pattern in this string. |
| isEmpty | method |
dart bool isEmpty |
Whether this string is empty. |
| isNotEmpty | method |
dart bool isNotEmpty |
Whether this string is not empty. |
| + | method |
dart String +(String other) |
Creates a new string by concatenating this string with other. |
| substring | method |
dart String substring(int start, [int? end]) |
The substring of this string from start , inclusive, to end , exclusive. |
| trim | method |
dart String trim() |
The string without any leading and trailing whitespace. |
| trimLeft | method |
dart String trimLeft() |
The string without any leading whitespace. |
| trimRight | method |
dart String trimRight() |
The string without any trailing whitespace. |
| ***** | method |
dart String *(int times) |
Creates a new string by concatenating this string with itself a number |
| padLeft | method |
dart String padLeft(int width, [String padding = ' ']) |
Pads this string on the left if it is shorter than width. |
| padRight | method |
dart String padRight(int width, [String padding = ' ']) |
Pads this string on the right if it is shorter than width. |
| contains | method |
dart bool contains(Pattern other, [int startIndex = 0]) |
Whether this string contains a match of other. |
| replaceFirst | method |
dart String replaceFirst(Pattern from, String to, [int startIndex = 0]) |
Creates a new string with the first occurrence of from replaced by to . |
| replaceFirstMapped | method |
dart String replaceFirstMapped(Pattern from, String Function(Match match) replace, [int startIndex = 0])
|
Replace the first occurrence of from in this string. |
| replaceAll | method |
dart String replaceAll(Pattern from, String replace) |
Replaces all substrings that match from with replace. |
| replaceAllMapped | method |
dart String replaceAllMapped(Pattern from, String Function(Match match) replace) |
Replace all substrings that match from by a computed string. |
| replaceRange | method |
dart String replaceRange(int start, int? end, String replacement) |
Replaces the substring from start to end with replacement . |
| split | method |
dart List |
Splits the string at matches of pattern and returns a list of substrings. |
| splitMapJoin | method |
dart String splitMapJoin(Pattern pattern, {String Function(Match)? onMatch, String Function(String)? onNonMatch})
|
Splits the string, converts its parts, and combines them into a new |
| codeUnits | method |
dart List |
An unmodifiable list of the UTF-16 code units of this string. |
| runes | method |
dart Runes runes |
An Iterable of Unicode code-points of this string. |
| toLowerCase | method |
dart String toLowerCase() |
Converts all characters in this string to lower case. |
| toUpperCase | method |
dart String toUpperCase() |
Converts all characters in this string to upper case. |
References#
The StringSignalExtension type is referenced and used in the following pages: