ConstantString class

Implemented types
Implementers

Constructors

ConstantString(Object string)

Properties

codeUnits List<int>
An unmodifiable list of the UTF-16 code units of this string.
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
isEmpty bool
Whether this string is empty.
no setteroverride
isNotEmpty bool
Whether this string is not empty.
no setteroverride
length int
The length of the string.
no setteroverride
runes Runes
An Iterable of Unicode code-points of this string.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

allMatches(String string, [int start = 0]) Iterable<Match>
Matches this pattern against the string repeatedly.
override
codeUnitAt(int index) int
Returns the 16-bit UTF-16 code unit at the given index.
override
compareTo(String other) int
Compares this object to another object.
override
contains(Pattern other, [int startIndex = 0]) bool
Whether this string contains a match of other.
override
endsWith(String other) bool
Whether this string ends with other.
override
indexOf(Pattern pattern, [int start = 0]) int
Returns the position of the first match of pattern in this string, starting at start, inclusive:
override
lastIndexOf(Pattern pattern, [int? start]) int
The starting position of the last match pattern in this string.
override
matchAsPrefix(String string, [int start = 0]) Match?
Matches this pattern against the start of string.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
padLeft(int width, [String padding = ' ']) String
Pads this string on the left if it is shorter than width.
override
padRight(int width, [String padding = ' ']) String
Pads this string on the right if it is shorter than width.
override
replaceAll(Pattern from, String replace) String
Replaces all substrings that match from with replace.
override
replaceAllMapped(Pattern from, String replace(Match match)) String
Replace all substrings that match from by a computed string.
override
replaceFirst(Pattern from, String to, [int startIndex = 0]) String
Creates a new string with the first occurrence of from replaced by to.
override
replaceFirstMapped(Pattern from, String replace(Match match), [int startIndex = 0]) String
Replace the first occurrence of from in this string.
override
replaceRange(int start, int? end, String replacement) String
Replaces the substring from start to end with replacement.
override
split(Pattern pattern) List<String>
Splits the string at matches of pattern and returns a list of substrings.
override
splitMapJoin(Pattern pattern, {String onMatch(Match)?, String onNonMatch(String)?}) String
Splits the string, converts its parts, and combines them into a new string.
override
startsWith(Pattern pattern, [int index = 0]) bool
Whether this string starts with a match of pattern.
override
substring(int start, [int? end]) String
The substring of this string from start, inclusive, to end, exclusive.
override
toLowerCase() String
Converts all characters in this string to lower case.
override
toString() String
A string representation of this object.
override
toUpperCase() String
Converts all characters in this string to upper case.
override
trim() String
The string without any leading and trailing whitespace.
override
trimLeft() String
The string without any leading whitespace.
override
trimRight() String
The string without any trailing whitespace.
override

Operators

operator *(int times) String
Creates a new string by concatenating this string with itself a number of times.
override
operator +(String other) String
Creates a new string by concatenating this string with other.
override
operator ==(Object other) bool
The equality operator.
override
operator [](int index) String
The character (as a single-code-unit String) at the given index.
override