LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting string to column array

Hi, I have a string of data e.g. Test. I want to put every each single char of such random string seperately to column array (vector) - every element of string is one element of array. Can you simply explain how to do it? regards, Marcin
0 Kudos
Message 1 of 7
(3,966 Views)

I'm thinking string to Byte array and then typecast the bytes back into strings.

 

There might be a more efficient way though.

 

Convert snippet.png

Message 2 of 7
(3,957 Views)

Hi,

 

that's the traditional way (ever learned BASIC and used mid$?):

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 7
(3,939 Views)

You can use Match Pattern too, just for fun.

 

snip.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 7
(3,926 Views)

Adding to the fun:

 

StringToCharArray.png

 

There has to be a few more ways.

 

Edit:  In case we have yet to cross over into the ridiculous:

 

StringToCharArray.png

0 Kudos
Message 5 of 7
(3,922 Views)

Thank you guys, I have to implement all of these solutions and test it. Thanks a lot 🙂

0 Kudos
Message 6 of 7
(3,898 Views)

Don't test. All you need is the first one... and you can even leave out the string constant wired to the typecast function. 😄

0 Kudos
Message 7 of 7
(3,891 Views)