toRange()
Converts the value to a range.
Declaration
func toRange() -> NSRangeReturn Value
A range representation of the value.
Discussion
This method treats the value as a JavaScript object, reading the values of its location and length properties using the toDouble() method and creating a NSRange structure from the result. If the value is not a JavaScript object or does not have the appropriate properties, the resulting range is invalid.