Geometry nodes: String to integer?

So far, I have to use workarounds with many “if” statements and I think I’m missing something here.

Is there an elegant solution to make strings behave as integers?

“String to value” in 5.0

May I ask why don’t you use a Value node instead (and the Value to String if you then need it as a string)?

took that as a bit of a challenge, came up with this.
might be a bit too complicated but works.

inside the nodegroup:

to extract a single digit from the left:

to decode the digit into a number from 0 to 9:

You absolutely may! It’s because in my other, more sophisticated node trees, I prefer using Strings instead of integers (sometimes). I often use many, slight variations of the same thing.

And most of my node trees look like this below, so I usually don’t even bother explaining why I do things the way I do. Too many rules, exceptions and edge cases to take into consideration. I believe only very few people would bother to read the complete explanation for each case of my technical questions here.

So, I try to simplify my needs as much as possible here.

Thanks! Although that’s what I was hoping to avoid in the first place. :smiley: Still, an interesting workaround. But since Blender will do this natively from 5.0, I’ll just install a preview version and be done with it.