ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multi string

Dears,
Actually am using a dll which will give a output string like this.
 
string1 followed by a null character
string2 followed by a null character
.
.
.
string4 followed by a double null character which indicates end of the string.
 
How can i extract it and display in a string indicator one by one?
 
Thanks,
Mathan
0 Kudos
Message 1 of 9
(3,712 Views)
Hi mathan,
what do you mean with one by one? You can use the "Spreadsheet string to array" function and run through a loop to show every array entry in your indicator.
Mike
Message 2 of 9
(3,711 Views)
Dear mike,
 
Actually the dll returns 4 strings. (string1 with null character in the end, string2 with null character in the end.... string 4 with a double null character in the end.)
 
I need to show all the 4 values in a string indicator.
 
Hope i was clear this time?
 
Thanks,
Mathan
0 Kudos
Message 3 of 9
(3,709 Views)

Hi mathan,

like this? If not can you please upload an example with example strings you get and the expected result?

Mike



Message Edited by MikeS81 on 06-20-2008 09:20 AM
Message 4 of 9
(3,704 Views)

Dear mike,

Actually the multistring output from the dll will be like this format (assume)

mathan\0mike\0partha\0JLV\0dennis\0ben\0altenbach\0rolfk\0tst\0ni\0\0

Then i need the output like this.

mathan

mike

.

.

.

ni

all values stored in a string array.

Hope i was clear.

Thanks,

Mathan

Message 5 of 9
(3,682 Views)
Hi mathan,
use the "spreadsheet string to array" function and delete the last two elements. Smiley Happy
 
 
Mike


Message Edited by MikeS81 on 06-20-2008 12:01 PM
Message 6 of 9
(3,679 Views)
Dear mike,
actually every name is terminated by a \0 (single 0) and finally the whole multistring was terminated by a \0\0 (double \0).
 
Mathan
Message 7 of 9
(3,675 Views)
Hi mathan,
i switched to "code display", that´s the reason for the "\00". You can use every other delimiter.
Mike
Message 8 of 9
(3,670 Views)

yes mike,

its working. thanks a lot.

Mathan

Message 9 of 9
(3,664 Views)