[Feature Request] Respectfully asking for 'Select on String' node to be added.

At the moment when using blueprints, we have to use Switch on String for XYZ.

Idk how to explain this any better, but everyone i have encountered agrees that the Select on String node should be added.

Personally i’ve been wondering why it isn’t added already. 3+ Years now.

What is the problem with Switch on String?

If you have a string variable for example, and you need to set the text in it depending on string, you will then have to add as many “Set String Variable” nodes as the amount of outputs of Switch on String…

Basically the exact same reason that Select on Int exists…

Why would you even ask this?

3 Likes

Select is pure, switch is impure, so to use it effectively you kind of have to make another variable or put it inside a function. A select node is always preferred in my workflow.

Just came across this very need right know.

1 Like

Still needed though

1 Like

Select nodes evaluate all paths that lead into them - which means if you’re doing something with string operations it could get needlessly expensive pretty fast. You probably want to be using Switch nodes.

All this aside, string comparisons are the most expensive comparisons you can possibly do.

would using FName/Name instead of string help with “performance” here?

Well, if you need Select on String node… you can always create a String-String (Map type) variable… and use the find node… https://i.imgur.com/zhuPIEA.png

1 Like

Probably not.

Oh lord, don’t do this 0_o

1 Like

personally i use that with 1 character on each array element (with a total of 5 elements). thus there isn’t any issue with performance. Even though i basically have it on tick.

ofc the more the characters & elements the array has … the more you’ll see performance drop. But even so… that would only be a problem if you had it on tick. It depends.

the Find node on the map variable type, only scans the Keys - not the Values… which means the Values can be as long as you’d need with no issues on performance :slight_smile:

1 Like

Works for me thanks