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 CONTAIN

Name:
    STRING CONTAIN
Type:
    Let Subcommand
Purpose:
    Return a 1 if a string contains a specified substring and a 0 if it does not.
Syntax:
    LET <iflag> = STRING CONTAIN <s1> <s2>
    where <iflag> is a parameter containing a 1 if <s1> contains the string <s2> and 0 otherwise;
                <s1> is the name of a pre-existing string;
    and      <s2> is the name of a pre-existing string.
Examples:
    LET IFLAG = STRING CONTAINS SORG SMATCH
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 IFLAG = STRING CONTAINS "alan.heckert@nist.gov" "alan"

    you need to do

      LET STRING SORG = alan.heckert@nist.gov LET STRING SMATCH = alan LET SOUT = STRING CONTAINS SORG SMATCH

    The name on the left hand side of the equal sign should either be a previously existing parameter or not previously defined. If it is a previously existing string, variable, or matrix name, an error will be reported and the requested parameter 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:
    2019/01
Program:
     
    LET STRING S1 = alan.heckert@gmail.com
    LET STRING S2 = alan
    LET IFLAG = STRING CONTAINS S1 S2
        
    The following output is returned
     
     PARAMETERS AND CONSTANTS--
    
         IFLAG   --  0.1000000E+01
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 01/31/2019
Last updated: 01/31/2019

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