LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reverse order of concatenated string

As above,

 

I have used the concatenate strings function. Is there was to reverse the order of the strings before I output them as a message to the user, as the information is in reverse order??

 

Thanks,

0 Kudos
Message 1 of 8
(4,668 Views)

Hi richard,

 

as it's not entirely clear, what you are looking for: either change the order of the input strings at the ConcatString function or use the ReverseString function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(4,656 Views)

what is your mean reverse
reverse action or 
reverse string

0 Kudos
Message 3 of 8
(4,648 Views)

@lvrichard wrote:

As above,

 

I have used the concatenate strings function. Is there was to reverse the order of the strings before I output them as a message to the user, as the information is in reverse order??

 

Thanks,


I am not sure what you want, so only pure guessing: you might consider using a string array to keep the messages at separated array indexes. In this way you can easily change oder of msgs by the simple array functions...

0 Kudos
Message 4 of 8
(4,643 Views)

@lvrichard wrote:

As above,

 

I have used the concatenate strings function. Is there was to reverse the order of the strings before I output them as a message to the user, as the information is in reverse order??

 

Thanks,


Why not concatenate the strings in the right order to begin with instead of concatenateing them and then trying to reverse the concatenate order?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(4,580 Views)

I'm sure there are many ways to do this. If you have words in your message, and you want to reverse the order of the words, you can search search for all of the spaces and get an array of all the words. Then reverse the array and add the spaces back in. It will be very similar if your words are separated by new lines.

 

Reverse String By Word.png

 

Edit: And Altenbach will post something with only 2 block diagram nodes in 3... 2... 1...

Message 6 of 8
(4,564 Views)

 

toto.png

 

 

(I have not found better)

0 Kudos
Message 7 of 8
(4,530 Views)

Another solution using regex.

 

Reverse String.png

 

Ben64

0 Kudos
Message 8 of 8
(4,494 Views)