LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating String Data

Hi,

 

  I am trying to have a simple VI program where certain portions of my string data will be manipulated accordingly. I am trying to have my input of my word that I type in, it will take the word and separate it into two strings-one with the first half of the original word and one containing the second half. For example, when I type in the word Unreal the output shour read ealnunr (notice the second letter of the word Unreal is in the middle). If there is an odd number of letters like the word Geforce the output should read rceegefo (in other words it will have one more letter in the tail end if the number of letters is an odd number. I have my program setup where the inputed word will be parsed into two strings going into a loop. I have a shift register in the loop. Unfortunately, I have not come up with a way to separate the two strings based on the number of letters and getting them to look like I described above in the final output. Thanks.

 

Attached is the VI.

0 Kudos
Message 1 of 4
(2,299 Views)

In the string pallette you have String Length and in the math you have Divide. Combine that with your String Subset x2, one with Offset and one with Length wired and you should be pretty close. No loop needed (for a single word).

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,287 Views)

"Combine that with your String Subset x2, one with Offset and one with Length wired and you should be pretty close."

 

I am not sure I follow. Is it possible you could show me by modifying and uploading my VI. I am pretty new at this. I would greatly appreicate it.

 

                                                                                                                                                                                            Thanks.

0 Kudos
Message 3 of 4
(2,281 Views)

hi,

Try this.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 4 of 4
(2,255 Views)