Discuss Scratch

LandonM2019
Scratcher
4 posts

how do you separate a string letter by letter in scratch?

Hi, im making a password generator in scratch, and i want to have it so that when the URL for the website is typed in, the algorithm looks at each individual letter or number or symbol in the URL and does certain things to it based on what exactly it is. However, i do not know how to get it so that the URL gets separated and analyzed for each individual character. Does anyone know how to do that?
vcokltfre
Scratcher
100+ posts

how do you separate a string letter by letter in scratch?

define separateLetterByLetter (string)
set [num] to [1]
repeat (length of (string))
add (letter (num) of (string)) to [letters v]
change [num] by (1)
end

Last edited by vcokltfre (Oct. 8, 2019 16:36:24)


GENERATION 363: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment. I did not start this.

set [neuron#6352] to [0.164523846]
set [neuron#6353] to [0.938245764]
set [neuron#6354] to [0.983563488]
set [neuron#6355] to [0.527382948]
set [neuron#6356] to [0.163548436]
set [neuron#6357] to [0.983456385]

Powered by DjangoBB