-
Couldn't load subscription status.
- Fork 0
ProtoString toObject() Method
Seth Clydesdale edited this page Jun 7, 2015
·
1 revision
Converting a string literal into an object.
'Salut'.toObject(); // returns {0:'S', 1:'a', 2:'l', 3:'u', 4:'t', length:5, toString:func()}You can convert it back to a string by calling the toString method.
var strObj = 'Salut'.toObject();
strObj.toString(); // returns 'Salut'The toObject method converts a string literal into an object. You can convert an object converted string back to a string literal by calling the toString method on it.
String.toObject();Home • History • ProtoString • Created by Seth Clydesdale