SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

STRING REMOVE WHITESPACE

Name:
    STRING REMOVE WHITESPACE
Type:
    Let Subcommand
Purpose:
    Remove the white space characters from a string.
Description:
    The STRING REMOVE SPACES command can be used to remove spaces from a string. This command will remove, in addition to spaces, the non-printing characters (i.e., codes 0 to 32 and 127 in the ASCII collating sequence). Currently, Dataplot only checks for characters in the 0 - 127 range of the ASCII collating sequence.
Syntax:
    LET <sout> = STRING REMOVE WHITESPACE <sorg>
    where <sout> is the name of the resulting string;
    and <sorg> is the name of the original string.
Examples:
    LET SOUT = STRING REMOVE WHITESPACE STIN
Note:
    The name of the new string can be the same as the original string. For example,

      LET STR = STRING REMOVE WHITESPACE STR

    In this case, STR will now contain the the string with all white space characters removed rather than the original string.

Note:
    The string on the right hand side of the equal sign must be a previously existing string. That is, expressions are not allowed. For example, the following will result in an error message

      LET STOUT = STRING REMOVE WHITESPACE "a b c d"

    you need to do

      LET STRING SORG = a b c d
      LET SOUT = STRING REMOVE SPACES SORG

    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.

Note:
    The total number of characters that DATAPLOT can use for storing functions and strings is set when DATAPLOT is built. The current default (11/2008) is 50,000 characters. Previous versions may set this limit at 1,000 or 10,000 characters. This limit applies to the combined number of characters for all functions and strings.
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Data Management
Implementation Date:
    2018/10
Program:
     
    let string stin = a b c d
    let stout = string remove whitespace stin
    print stin stout
        
    The following output is returned
     
     FUNCTIONS--
    
         STIN    --a b c d
         STOUT   --abcd
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 10/10/2018
Last updated: 10/10/2018

Please email comments on this WWW page to alan.heckert@nist.gov.