ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 29 Dec 2013 08:00 PM |
I want to subtract 1 letter from an entire string at a time. Can it be done? How can it be done?
I was thinking:
string="Hello World!"
string=string-1
(HELP?)
|
|
|
| Report Abuse |
|
|
|
| 29 Dec 2013 08:01 PM |
string = "Hello World!"
string = string:sub(1,#string-1) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Dec 2013 08:01 PM |
string = string:sub(1, #string - 1) is one way string = string:sub(1, -2) is another |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
| |
|