The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: CLAD2017 - Fundamentals - String to Array to String

SercoSteveB
Active Participant

Assuming the whitespace between the words within String Constant are space characters (\s) and the EOLs are \n.

 

What is spreadsheet string following execution of the VI?

 

String to Array to String.png

 

String to Array to String Answers.jpg

Comments
maccapple
Member

B

crossrulz
Knight of NI

B


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
wayrider
Member

B

Sangameshsh
Member

B like will be shifted by two times

Matt-A.
Member

B

skian
Member

B.

istan0227
Member

B

CA-Pioneer
Member

B.

1) use "spreadsheet string to array" to build 2D array by delimiter character " ", each string is convert to an element in the 2D array;
2) use index array to select the column  = 1 sub array, it is 1D array ('Likes', 'Does', 'Rock's);
3) rotate this 1D array 2 times, it is changed to ('Does', 'Rocks','Likes')

4) use replace subset array to replace the original 2D array (col index = 1) to new rotated array, so ('Likes', 'Does', 'Rock's) -> ('Does', 'Rocks','Likes')

5) join the 2D array back to string by delimiter " ";