Characters between block no longer always returns a string

Use this template to make awesome bug reports:

Your username: Petrichor.

What kind of device are you using?: (Also include iOS version, and Hopscotch version) iPhone 8, Hopscotch 3.48.3, player 2.0.0, and also on 3.49.0 on my mac

The “characters between” block has in the past always returned a string even if the value could be converted to a number. This is a very useful feature that makes many things much easier. However, in the newest webplayer, this is no longer the case. Instead, it will convert it to a number.

The expected result is that the object would set text to “0000009b” but it removes the leading 0s since it converts to a number (and back, which is probably not very good for performance) in between the characters between block and the concatenation, which has never happened before.

Is this intentional? If it is I think that it is very important that we get a way to use strings consisting of only digits as strings very soon.


Yes!! This is happening to me too!

it is very important that we get a way to use strings consisting of only digits as strings very soon.



-1/10 would be very nice to see


Yeah this is not intentional — ‘characters between’ should get those characters in the string from the positions that you specified. We’ve added it to our list to fix.


Will this be fixed in time for the next spring competition deadline?


Unfortunately it probably won’t, I have added it to our list though.

1 Like

Ok it looks like Characters Between is actually converting the string to a number, or cutting off leading 0s, before slicing it.

For this code:

I expect “000” but it displays “9”

Basically whenever I change the “3” to any number higher than 1, it will keep returning 9. I suspect that the input string is converted to 9, and thus characters between 0 and any number will just keep returning 9.

Edit: now I remember the original example in the post has “a” — I’ll just edit a screenshot so the steps are clear.


Please fix this bug it brakes complex projects.
Also do you have a dew date?


Any idea when this will be fixed?

1 Like

@t1_hopscotch ^^^

we all hope as soon as possible- it’s still possible to work with string, however it’s pretty counter-intuitive and not easy to work with

personally, i think “character at index”, “character between” and “length” [1] should by default consider any number as string in their first input (just like the new update where any inputs in non-addition operators only allows numbers, not text)

  1. so basically the three text operators ↩︎


Yes, that too. It would also be helpful to split the + block into + and a concatenation block, instead of having it be the same block, though that one would not be as good. And of course text blocks should always return text, unless it doesn’t make sense (length)