Deleting characters from a string?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Deleting characters from a string?

Post by dburdan » Fri Feb 11, 2011 12:45 am

I am trying to remove the first 5 characters from a string as I bring it into the program. I have yet to accomplish this. What I have so far:

Code: Select all

   put URL("file:" & specialFolderPath("documents") & "/GameData.hs") into LocalHighScore #This part works fine
   replace char 1 to 5 with empty in LocalHighScore
   put base64decode(LocalHighScore) into LocalHighScore
   answer LocalHighScore #Just here to see if it works
It doesn't delete any characters. I have tried many different methods and looked in the dictionary with no luck.

Thanks in advance Klaus :D

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Deleting characters from a string?

Post by doc » Fri Feb 11, 2011 1:10 am

Try this:

Code: Select all

delete char 1 to 5 in LocalHighScore
-Doc-

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: Deleting characters from a string?

Post by dburdan » Fri Feb 11, 2011 1:31 am

doc wrote:Try this:

Code: Select all

delete char 1 to 5 in LocalHighScore
-Doc-
THANKS!!!

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Deleting characters from a string?

Post by Klaus » Fri Feb 11, 2011 11:43 am

Oh, I am a bit lat, but looks like I have to earn the "Thanks" now :D

Yep, you need to supply in your scripts WHERE you want to replace something!

Computers are deaf, dumb and blind!
So what is obvious to us is greek to the machine :D :D :D


Best

Klaus

Post Reply