StringSlice class
A slice of a larger string.
Represents the substring of source from start to end. Allows some operations on that substring without having to create it as a separate string.
Constructors
Properties
- end → int
-
The end of the slice.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
length of the string slice.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String
-
The original string.
final
- start → int
-
The start of the slice.
final
Methods
-
contains(
String pattern) → bool -
Whether the slice string contains
pattern
. -
indexOf(
String pattern, [int start = 0, int? end]) → int -
The index of the first occurrence of
pattern
in this slice string. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subslice(
int start, [int? end]) → StringSlice - A sub-slice of the string slice.
-
substring(
int start, [int? end]) → String - A substring of the string slice.
-
toString(
) → String -
The slice string characters as a separate string.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited