Making a string shorter?

BlitzMax Forums/BlitzMax Beginners Area/Making a string shorter?

JBR(Posted 2012) [#1]
Hi,

name$ = "JIMMYB"

How do I remove the last letter to get "JIMMY"

or remove any last letter.

Thanks
Jim


GfK(Posted 2012) [#2]
Two ways

First, name = left(name,len(name)-1)

...or read up on slices in the documentation. On my ipad atm so can't test owt.


JBR(Posted 2012) [#3]
Hi, Gfk, just found the same question answered. The Left$ works for me.

Jim