Part of the Samples Website. 8/16/97.

samples.basicStuff.stringPotpourri

«A miscellaneous grab bag of string stuff
«step thru the script in the debugger
local (s)
s = "Do you know the way to San Jose?"
msg (string.upper (s))
msg (string.lower (s))
msg (string.replaceAll (s, "o", "o"))
msg (string.mid (s, 1, 5)) «show the first five characters
msg (string.delete (s, 1, 5)) «show all but the first five characters
msg (string.insert ("***", s, 5)) «insert three stars at character 5
msg (string.filledString ("-", 50))
msg (string.filledString ("ABC", 10))
msg (string.addCommas (1000000)) «displays 1,000,000
msg (string.kBytes (memAvail ())) «show the amount of memory available


This page was last built on Sat, Aug 16, 1997 at 6:41:19 PM. You can download the current set of sample scripts from our FTP site. Dave