|
STRING SPLITName:
This command is an alternative to using STRING WORD. STRING WORD is used to extract a specific word in the string while STRING SPLIT will extract all the words in a string to individual strings. Note that only the base name will be specified. For example, if you specify SOUT as the base name and there are three words in the original string, then string SOUT1 will contain the first word, SOUT2 will contain the second word, and SOUT3 will contain the third word. In Dataplot, spaces are used to separate words.
where <sorg> is the name of a pre-existing string; and <sout> is the base name of the resulting strings. The <sout> defines the base name. An integer index will be appended to the base name for each string (the index starts at 1).
LET SOUT = STRING SPLIT SORG Using
will not work. It will try to see if "xxxx" is the name of currently defined string. If it is not, no new strings will be created. Enclosing the literal text in quotes will not make this work. The name on the left hand side of the equal sign may be a previously existing string. However, if it is a previously existing parameter, variable, or matrix name, an error will be reported and the requested string will not be created.
with <char> denoting the character to use as the word delimiter.
2020/08: Automatically save NUMBWORD parameter LET STRING SORG = X1 X2 X3 X4 X5 LET SNAME = STRING SPLIT SORG PRINT SNAME1 SNAME2 SNAME3 SNAME4 SNAME5The following output is returned FUNCTIONS-- SNAME1 --X1 SNAME2 --X2 SNAME3 --X3 SNAME4 --X4 SNAME5 --X5
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 10/10/2018 |