Discuss Scratch
- Discussion Forums
- » Suggestions
- » Slight "Letter () of" block change
- -Yugen-
-
56 posts
Slight "Letter () of" block change
Alright, so we're all acquainted with the lovely
letter () of []block, but what if we changed it to:
([first v] () letters of []::operators)What this would allow for is a multiple letter output rather than only a single letter output. Also, the first dropdown box could include 2 things:
([first v] () letters of []::operators)You could always do
([last v] () letters of []::operators)
([first v] (1) letters of [world]::operators)and still get the “w” output, but the whole block is improved in general. I don't know about all of you, but I'm tired of making a huge workaround like this:
define Find first (♯) letters of [text]It would just make life so much more simple. Thanks for reading!
set [output v] to []
set [i v] to [1]
repeat (♯)
set [output v] to (join (output) (letter (i) of (text)))
change [i v] by (1)
- jokebookservice1
-
1000+ posts
Slight "Letter () of" block change
Hmm, sounds good but
Maybe an additional block, and even better if it looked lie this:
You could always do
Your block could then be made by:
That suggestion, I believe, is already suggested.
On the other hand, Scratch is designed to teach kids to program, so it helps if they have to learn how string manipulation actually works by implementing it themselves.

Is only accurate for the first and last letter. I don't see how you could do it for a middle letter, and to get a middle letter you would need a difficult workaround (well, not You could always do that difficult)([first v] (1) letters of [world]::operators)
Maybe an additional block, and even better if it looked lie this:
You could always do
((1) through (3 v) of [world]::operators)Where the drop-down would contain only last but you could enter your own numeric values, like in the point-towards(angle) block.
Your block could then be made by:
- If you want the first letters, just type 1 in the first area and the amount of chars in the second.
- If you want “last” then you need to put “lengthOf(yourString) - AMOUNTofCHARStoGRAB” as the first paramater, and select “last” from the second
That suggestion, I believe, is already suggested.
On the other hand, Scratch is designed to teach kids to program, so it helps if they have to learn how string manipulation actually works by implementing it themselves.

- gamebeater187
-
1000+ posts
Slight "Letter () of" block change
Support.
([middle to right v] letters () of []) :: operators reporter
([middle to left v] letters () of []) :: operators reporter
- -Yugen-
-
56 posts
Slight "Letter () of" block change
Really very constructive! Thanks for the feedback! Hmm, sounds good butIs only accurate for the first and last letter. I don't see how you could do it for a middle letter, and to get a middle letter you would need a difficult workaround (well, not You could always do that difficult)([first v] (1) letters of [world]::operators)
Maybe an additional block, and even better if it looked lie this:
You could always do((1) through (3 v) of [world]::operators)Where the drop-down would contain only last but you could enter your own numeric values, like in the point-towards(angle) block.
Your block could then be made by:
- If you want the first letters, just type 1 in the first area and the amount of chars in the second.
- If you want “last” then you need to put “lengthOf(yourString) - AMOUNTofCHARStoGRAB” as the first paramater, and select “last” from the second
That suggestion, I believe, is already suggested.
On the other hand, Scratch is designed to teach kids to program, so it helps if they have to learn how string manipulation actually works by implementing it themselves.
- Discussion Forums
- » Suggestions
-
» Slight "Letter () of" block change