Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Split String with changing amounts of white space


RyanBares Jul 14, 2015 08:38 PM

Is there a universal white space character in CRbasic for the SplitStr function? I am using a CR1000 to record a serial string where the output is constantly changing the amount of white space between characters depending on significant digits and presence / absence of a - sign. So if I hard code it like the following:

SplitStr (LI_6262_string(),InString, " " ,4,4)

I get roaming NAN's depending on where it is in the program. Is there a CHR() value that works for any given amount of white space?

Ryan


JDavis Jul 20, 2015 04:14 PM

If what you need to pull out is just numbers, you could probably use the Numeric option.

The other way to go about it is to make use of the FilterString to indicate the characters to pull out in place of indicating a delimiter.(See SplitStr help)

Log in or register to post/reply in the forum.