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 DELETE

Name:
    STRING DELETE
Type:
    Let Subcommand
Purpose:
    Remove a user specified list of characters from a string.
Description: Syntax:
    LET <sout> = STRING DELETE <sorg> <slist>
    where <sout> is the name of the resulting string;
                <sorg> is the name of the original string;
    and <slist> is the name of the original string.

    You specifiy the characters you want to delete by defining the <slist> string. That is, <sorg> will be checked against each character in <slist>.

Examples:
    LET SOUT = STRING DELETE STIN SLIST
Note:
    The name of the new string can be the same as the original string. For example,

      LET STR = STRING DELETE STR

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

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

      LET STOUT = STRING DELETE "alan.heckert@nist.gov" "@"

    you need to do

      LET STRING SORG = alan.heckert@nist.gov
      LET STRING SLIST = @
      LET SOUT = STRING DELETE SORG SLIST

    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 = abcdefgabcdefg
    let string slist = cde
    let stout = string delete stin slist
    print stin stout
        
    The following output is returned
     
     FUNCTIONS--
    
         STIN    --abcdefgabcdefg
         STOUT   --abfgabfg
        

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.