ScratchData LogoScratchData
Back to TheLogFather's profile

String manipulation blocks

THTheLogFather•Created March 5, 2014
String manipulation blocks
162
139
4667 views
View on Scratch

Instructions

Scratch's lack of built-in string manipulation means working with strings can be rather tedious. Had several of these hanging around for a while now, in various forms, so decided to tidy them up and bring them together. Plenty more I can think of, but these are a decent start! Here's some background: http://scratch.mit.edu/discuss/topic/15290/ http://scratch.mit.edu/discuss/post/135002/

Description

*** UPDATE 20140627: fixed "insert into string" and "overwrite into string" blocks - thanks @Thepuzzlegame for spotting bug! --------------------------------------------------------- Special points to note: "letters m to n of string" can be given m>n, in which case it will reverse the result :) Similarly, the substring search ("find substr in string from position m to position n") will search backwards if m>n. So you can find the first occurrence of a string, or the last. And once you have a position, you can use it again to find the next one, until you have them all. The blocks that detect case (in the second page, from top-right icon) need the custumes that go along with the sprite.

Project Details

Project ID18838153
CreatedMarch 5, 2014
Last ModifiedJune 27, 2014
SharedMarch 8, 2014
Visibilityvisible
CommentsAllowed