Core
Methods | Properties | Base Classes | Derived Classes |
---|---|---|---|
Compare | All | ||
CompareTo | Begin | ||
Contains | Current | ||
EndsWith | Empty | ||
FindFirstOf | End | ||
FindLastOf | IsNotEmpty | ||
FindRangeExclusive | OriginalString | ||
FindRangeInclusive | |||
MoveNext | |||
Replace | |||
RuneIteratorFromByteIndex | |||
RuneIteratorFromRuneIndex | |||
Split | |||
StartsWith | |||
Constructor | |||
SubString | |||
SubStringBytes | |||
ToLower | |||
ToString | |||
ToUpper | |||
Trim | |||
TrimEnd | |||
TrimStart |
Properties
All : stringrange
read-only
var All : StringRange
Begin : runeiterator
read-only
Returns the RuneIterator at the start of this range.
var Begin : RuneIterator
Current : rune
read-only
var Current : Rune
Empty : boolean
read-only
var Empty : Boolean
End : runeiterator
read-only
Returns the RuneIterator at the end (one past the last Rune) of this range.
var End : RuneIterator
IsNotEmpty : boolean
read-only
var IsNotEmpty : Boolean
OriginalString : string
read-only
Returns the entire string that this range was constructed from.
var OriginalString : String
Methods
Compare : integer
static
Compares the two string ranges and returns an integer to denote their relative sort order. |Name|Type|Description| |---|---|---| |left|stringrange| | |right|stringrange| |
function Compare(left : StringRange, right : StringRange) : Integer
CompareTo : integer
Returns if this string range is equal to the given range. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function CompareTo(p0 : StringRange) : Integer
Contains : boolean
Returns if the string Contains the specified substring. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function Contains(p0 : StringRange) : Boolean
EndsWith : boolean
Returns if the string ends with the specified substring. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function EndsWith(p0 : StringRange) : Boolean
FindFirstOf : stringrange
Returns a StringRange that Contains the first occurrence of given StringRange. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function FindFirstOf(p0 : StringRange) : StringRange
FindLastOf : stringrange
Returns a StringRange that Contains the last occurrence of given StringRange. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function FindLastOf(p0 : StringRange) : StringRange
FindRangeExclusive : stringrange
Finds the first StringRange that starts with 'startRange' and ends with 'endRange'. This substring excludes 'startRange' and 'endRange'. |Name|Type|Description| |---|---|---| |startRange|stringrange| | |endRange|stringrange| |
function FindRangeExclusive(startRange : StringRange, endRange : StringRange) : StringRange
FindRangeInclusive : stringrange
Finds the first StringRange that starts with 'startRange' and ends with 'endRange'. This substring includes 'startRange' and 'endRange'. |Name|Type|Description| |---|---|---| |startRange|stringrange| | |endRange|stringrange| |
function FindRangeInclusive(startRange : StringRange, endRange : StringRange) : StringRange
MoveNext : Void
Name Type Description function MoveNext()
Replace : string
Returns a new string with all occurances of a substrings replaced with another substring. |Name|Type|Description| |---|---|---| |oldValue|stringrange| | |newValue|stringrange| |
function Replace(oldValue : StringRange, newValue : StringRange) : String
RuneIteratorFromByteIndex : runeiterator
Finds the iterator from a byte index. WARNING: Strings are UTF8 and constructing an iterator from bytes indices can make an iterator in the middle of a rune. |Name|Type|Description| |---|---|---| |byteIndex|integer| |
function RuneIteratorFromByteIndex(byteIndex : Integer) : RuneIterator
RuneIteratorFromRuneIndex : runeiterator
Finds the iterator from a rune index (the 'character' index). WARNING: this may be slow as finding an iterator from rune index requires a linear search. |Name|Type|Description| |---|---|---| |runeIndex|integer| |
function RuneIteratorFromRuneIndex(runeIndex : Integer) : RuneIterator
Split : stringsplitrange
Splits the string, according to the separator string, into a range of substrings. |Name|Type|Description| |---|---|---| |separator|stringrange| |
function Split(separator : StringRange) : StringSplitRange
StartsWith : boolean
Returns if the string ends with the specified substring. |Name|Type|Description| |---|---|---| |p0|stringrange| |
function StartsWith(p0 : StringRange) : Boolean
StringRange : Void
constructor
Name Type Description function StringRange()
SubString : stringrange
Constructs a StringRange from the given begin and end iterators. |Name|Type|Description| |---|---|---| |begin|runeiterator| | |end|runeiterator| |
function SubString(begin : RuneIterator, end : RuneIterator) : StringRange
SubStringBytes : stringrange
Constructs a substring based upon a number of bytes. WARNING: strings are UTF8 so indexing by bytes could produce unexpected results on non-ascii strings. |Name|Type|Description| |---|---|---| |startByteIndex|integer| | |lengthInBytes|integer| |
function SubStringBytes(startByteIndex : Integer, lengthInBytes : Integer) : StringRange
ToLower : string
Returns a copy of the string that has been converted to lowercase. |Name|Type|Description| |---|---|---|
function ToLower() : String
ToString : string
Returns a new string of the current range. |Name|Type|Description| |---|---|---|
function ToString() : String
ToUpper : string
Returns a copy of the string that has been converted to uppercase. |Name|Type|Description| |---|---|---|
function ToUpper() : String
Trim : stringrange
Trims all leading and trailing whitespace. |Name|Type|Description| |---|---|---|
function Trim() : StringRange
TrimEnd : stringrange
Trims all trailing whitespace. |Name|Type|Description| |---|---|---|
function TrimEnd() : StringRange
TrimStart : stringrange
Trims all leading whitespace. |Name|Type|Description| |---|---|---|
function TrimStart() : StringRange