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 SUBSET COUNT

Name:
    STRING SUBSET COUNT
Type:
    Let Subcommand
Purpose:
    Return the number of times a substring occurs within another string.
Syntax:
    LET <count> = STRING SUBSET COUNT <sorg> <smatch>
    where <count> is a parameter containing the number of times <smatch> is found in <sorg>;
                <sorg> is the name of a pre-existing string;
    and      <smatch> is the name of a pre-existing string.
Examples:
    LET NC = STRING SUBSET COUNT 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 NC = STRING SUBSET COUNT "alan.heckert@nist.gov" "@"

    you need to do

      LET STRING SORG = alan.heckert@nist.gov
      LET STRING SMATCH = @
      LET NC = STRING SUBSET COUNT 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.
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Data Management
Implementation Date:
    2019/02
Program:
     
    LET STRING S1 = alan.heckert@nist.gov,james.filliben@nist.gov
    LET STRING S2 = @
    LET NNAMES = STRING SUBSET COUNT S1 S2
        
    The value of NNAMES will be 2.

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 02/05/2019
Last updated: 02/05/2019

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