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 INDEX

Name:
    STRING INDEX
Type:
    Let Subcommand
Purpose:
    Return the start and stop position of a substring within a string.
Syntax:
    LET <nstart> <nstop> = STRING INDEX <sorg> <smatch>
    where <nstart> is a parameter containing the returned start position;
                <nstop> is a parameter containing the returned stop position;
                <sorg> is the original string;
                <smatch> is the substring to be matched within <sorg>;
    and <sorg> is the name of the string.
Examples:
    LET NSTART NSTOP = STRING INDEX S1 S2
Note:
    Both of the strings on the right hand side of the equal sign must be previously defined strings. String expressions are not allowed. So

      LET NSTART NSTOP = STRING INDEX SORG ".dat"

    should be coded as

      LET STRING S2 = .dat
      LET NSTART NSTOP = STRING INDEX SORG S2
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Data Management
Implementation Date:
    11/2008
Program:
     
    LET STRING S1 = file23.dat
    LET STRING S2 = 23
    LET NSTART NSTOP = STRING INDEX S1 S2
        
    The resulting values of NSTART and NSTOP are 5 and 6, respectively.

Date created: 12/4/2008
Last updated: 12/4/2008
Please email comments on this WWW page to alan.heckert@nist.gov.