String.substring()
Howto do a substring from a position to end i mobl? Seems like
Submitted by Terje Pedersen on 15 April 2011 at 08:59
“TE 34”.substring(3,-1)
doesn’t work so you have to do
“TE 34”.substring(3,“TE 34”.length)
Issue Log
On 15 April 2011 at 09:13 Zef Hemel commented:
Arguably you shouldn’t have to care about this (you’re programming in mobl, not in Javascript), but all of String’s methods map directly to their Javascript counter parts, so their behaviors and features are exactly the same. Adding the
-1
feature (which I like, by the way) tosubstring
would force me to override the native javascript function. Not sure I want to do that just yet (or maybe I can come up with another solution).
Log in to post comments