ExtraString
More ways to manipulate strings.
Summary
Type
Function
Function
boolean?
ToBoolean(string
str)
Function
array
Split(string
str, string
separator)
Function
boolean
EndsWith(string
str, string
phrase)
Function
boolean
StartsWith(string
str, string
phrase)
Methods
ToBoolean()
boolean? ToBoolean(string str)
Returns true
if str
is equal to the phrase "true" and false
if it is equal to the phrase "false". Will return nil
if neither conditions apply.
Split()
array Split(string str, str separator)
Splits a string into elements on an array based on the separator.
EndsWith()
boolean EndsWith(string str, string phrase)
Returns true
if str
ends with phrase
.
StartsWith()
boolean StartsWith(string str, string phrase)
Returns true
if str
starts with phrase
.
Last updated