02-20-2011 03:15 PM - edited 02-20-2011 03:17 PM
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.
02-20-2011 04:04 PM
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
02-20-2011 04:16 PM
"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.
02-21-2011 12:16 AM
hi,
Try this.