A feature I’d like to see in Hopscotch is:
A block to replace a part of a string with something else.
Preferably you’d be able to put a regular expression in the replace area.
I’d use it for this type of project:
Projects where I want to have a keyboard with new lines or a different looking keyboard, reversing text, working hopscotch editors in hopscotch
Here are some examples of Hopscotch code that could be improved if we had this:
Adding 1 leading zero to all 14s in a string
Here is an example design I’ve made:
I’ve seen something similar in another programming languages, it looks like this:
https://www.w3schools.com/jsref/jsref_replace.asp
27 Likes
I second that
Nice block rendering page
5 Likes
Imagine if this supported regular expressions :o
6 Likes
Having both a match and a replace block that supported regex would be a ‘game changer’ for advanced users! Think off all the data that could be encoded/decoded, and yet beginners could use the blocks simplistically too.
8 Likes
This should be possible, i think, but a tad bit more complicated
2 Likes
Why more complicated? What else would you want?
5 Likes
Dakoan
May 29, 2020, 3:02am
10
whoop used the wrong words
should = is
3 Likes
This is an amazing idea.
I’ve seen this in the shortcuts app.
3 Likes
Dakoan
May 29, 2020, 11:56am
13
whoop forgot to remove words
be =
2 Likes
How is it currently possible? You can tell if it will replace something with the mactehs block, you can maybe find out where it is, but you can’t actually replace it.
4 Likes
Awesome_E:
regular expressions
Yo I was gonna mention that today.
I found an epic Regex Git the other day, and I also learned of the existence of Swift Package Manager. Apps away.
3 Likes
This would definitely be very useful and should be added
6 Likes