TRANSLATE
s = TRANSLATE (source, what [, with])
Translates all occurrences of the string what
found in
string source
with the string with
and returns
the new string. If with
is not given, all occurrences of
what
will be removed.
Example 1: Replace
"ab_cd_ef"
s1 = translate(s1, "_", "!")
s2 = print s1 + " -> "; s2 ' Output: ab_cd_ef -> ab!cd!ef
Example 2: Remove
"ab_cd_ef"
s1 = translate(s1, "cd")
s2 = print s1 + " -> "; s2 ' Output: ab_cd_ef -> ab__ef
Code samples using TRANSLATE
3d rotating cube with message.bas
A Rubens, Peter Paul Landscape.bas
autumn scene.bas
base64.bas
btn 21.bas
bulls and cows.bas
graphics sampler.bas
irc-bot.bas
mastermind.bas
pirate.bas
PRINTA_OKOK.bas
scambling text.bas
scampling.bas
shooter.bas
sineballcube.bas
slide sq w mouse.bas
sliding blocks.bas
snow snake.bas
space shooter.bas
square elimination game v3.bas
startrek.bas
startrek.bas