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 STARTS WITH

Name:
    STRING STARTS WITH
Type:
    Let Subcommand
Purpose:
    Return a 1 if a string starts with a specified substring and a 0 if it does not.
Syntax:
    LET <iflag> = STRING STARTS WITH <s1> <s2>
    where <iflag> is a parameter containing a 1 if <s1> starts with <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 STARTS WITH S1 S2
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 STARTS WITH "alan.heckert@nist.gov" "alan"

    you need to do

      LET STRING SORG = alan.heckert@nist.gov
      LET STRING SMATCH = alan
      LET SOUT = STRING STARTS WITH 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:
    2018/10
Program:
     
    LET STRING S1 = alan.heckert@gmail.com
    LET STRING S2 = alan
    LET IFLAG = STRING STARTS WITH S1 S2
    PRINT IFLAG
        
    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: 10/10/2018
Last updated: 10/10/2018

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