Help with Strings

I’m working on a small project that basically overhauls the default Codea GUI when testing projects, and I’m working n adding parameters. But, for text fields (replacing parameter.text), I came upon a question; how do you remove something from a string? It wouldn’t be very useful in a text field if you could only write text and not press backspace. How can I remove the last letter from a string?

Thanks in advance.

I am new to Codea but I would try something with string.sub(j,i,l).

you want
s = string.sub(str,1,string.len(str)-1)

and you should find this summary useful
http://lua-users.org/files/wiki_insecure/users/thomasl/luarefv51.pdf

Ah, thanks. I saw string.sub, but had no idea what it did.

The user and all related content has been deleted.

To concarcerate(join) strings use

str="string one".."string two"

@Coder concatenate :smiley:

@NatTheCoder @Coder This was a discussion I made in early 2013…And if you had read the comments, I solved it. And it wasn’t for string concatenation…

Sorry I didn’t read the date but all these old discussions keep getting bumped to the from page? Maybe there should be some kind of archive of read only disscusions that have been asleep for a year or more?

@Coder, id say this was more @NatTheCoder, who has bumped multiple discussions recently. You likely assumed it was fresh since he had commented?

Yeah this keeps happening and sorry i should look at the date on the post

The user and all related content has been deleted.

@NatTheCoder, it’s when you comment something (usually useless) on an old discussion, bringing it back to the top of the discussion list.

The user and all related content has been deleted.

@NatTheCoder I’m 12…

I’ll be 13 in a few days, but that’s irrelevant. I’d assume you would have been 13 for a while.

@NatTheCoder I’m 13 also!

The user and all related content has been deleted.

@NatTheCoder Either way, you shouldn’t use your age as an excuse… It’s not bad to say you don’t know some thing, but this isn’t important, and you shouldn’t blame something for it.

The user and all related content has been deleted.

@NatTheCoder Why are you crying?