LabVIEW Idea Exchange

Showing results for 
Search instead for 
Did you mean: 

Enable / Disable indexing for a string in any loop

Status: New

Add the possibility to enable or disable the indexing for a string at the entry of any loop.

The result would be only one char by one char, and would be really usefull !


Of course, the same possibility at the exit would create ("build") the string from a char or a string...

String in Char.PNG

Knight of NI Knight of NI
Knight of NI
For what it's worth, you can do something similar to the top image today by placing a Concatenate Strings primitive on the 1D array. It will turn it into a single string.

Try to take over the world!

One Char.PNG

Here is another way to do it currently. But I agree it would be nice to have the option to index on chars.

Trusted Enthusiast
I like this. Out of interest, how would you expect it to work with, say, a 1D array of strings? Would you want the array elements (whole strings) indexed within the loop (which is how it would work now), or would you want the indexing to iteratively pick out the first character of each string element?
Thoric (CLA, CLED, CTD and LabVIEW Champion)


Yep, that's a good question, but the answer (I think) can't be other than your first suggestion:

A loop with a 1D Array indexing will give a string, as it's actrually doing, then if you want each char, you just add a new loop inside.

With reference to tst's comment (nice tip by the way, I didn't know that) you could then do what you want on the input side with a String To Array Of Single-Character Strings VI (easy enough to create) then just use the normal auto-indexing. I appreciate the suggested idea is neater but it is one more bit of 'hidden' behaviour for new users to learn, and experienced users to have to check when debugging, or examining someone else's code - it's even more hidden than array indexing because the wire doesn't change appearance as it passes through the terminal.
Active Participant
Great idea!!!
André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil