From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-10-2017 08:39 AM
Hi all!
I have a multi-line string, which I am handling by function "Pick line". The multi-line string may be different lenght. How I can to define end of multi-line string ?
Thanking in advance!
Solved! Go to Solution.
02-10-2017 08:49 AM - edited 02-10-2017 08:50 AM
Hi MaxiMuz,
in LabVIEW a string is defined by it's length, there is no special "end of string" char similar to a zero byte in other programming environments!
The "end of line" char usually CR…
How I can to define end of multi-line string ?
To define the length you could use StringStubset and provide the desired length!
02-10-2017 09:19 AM
You can use the Spreadsheet String to Array with a newline constant as the delimiter to convert your string to an array and then get the array size to determine how many lines are in your string. Not sure if that is what you are asking.
02-10-2017 09:50 AM
How I can to define end of multi-line string ?To define the length you could use StringStubset and provide the desired length!
That to define the length I must to know this length. For example , I am reading txt-file by "Read from Text File". Its is multi-line string, and I don't know how many the row it contains.
02-10-2017 10:00 AM
Right click the Read from Text File and select Read Lines. This will read each line of the file into an array index.
02-13-2017 04:49 AM
@aputman wrote:
You can use the Spreadsheet String to Array with a newline constant as the delimiter to convert your string to an array and then get the array size to determine how many lines are in your string. Not sure if that is what you are asking.
Thanks for the advise !
But , if as delimiter to use the LF(line feed), in this case if last lines are empty, then a last line don't considered.
Properly to use CR (carriage return).