I am getting a substring error. Can the documentation possibly be wrong?
My example is :
var String Template = “SMTWTFS 12:34 999”
var String MyString = “SMTWTFS 12:34 999”
var Number MyLength = 0
MyString = Template.substring(2,5)
MyLength = MyString.length()
As I understand the documentation, the string 1st character is position 0 and MyString should contain characters 2, 3, 4, and 5; i.e. “TWTF” however it does not. It contains “TWT” and MyLength = 3. I’ve tried adding characters via
MyString = MyString + “123”
to verify there is not an issue with a string termination character but there is not.
I get “TWT123” with MyLength = 6.
Any help will be appreciated.
…bob