2

I am trying to work with a string, and delete the last 2 characters. Normally the code would look like this:

delete char -1 to -2 of openprice

but that doesn't work, so I need to resort to doing this:

delete char -1 of openprice
delete char -1 of openprice

What is wrong here?

Normy Haddad
  • 181
  • 9

1 Answers1

2

Try the reverse:

delete char -2 to -1 of openprice

The last character of a left-to-right string is -1, so the second to last would be -2, etc.

Scott Rossi
  • 885
  • 5
  • 6