<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ToBeReviewed/STRING/

strcnt.pro

topstrcnt

result = strcnt(strn, substrn, startpos, HELP=HELP)

NAME: STRCNT PURPOSE: Count number of occurrences of a substring in a string. CATEGORY: text/strings CALLING SEQUENCE: num = strcnt(strn, substring, [pos]) INPUTS: string -- The string in which to count occurences. in substring -- The substring to count occurrences of. in pos -- the position at which to begin the search. [in] If not supplied, start at beginning of string. KEYWORD PARAMETERS: /HELP -- Print useful message and return. OUTPUTS: num -- Number of occurances of substring in string. out COMMON BLOCKS: SIDE EFFECTS: NOTES: Overlapping occurances are not counted separately. For example, counting occurances of 'bb' in 'blah bbb' returns one occurance. EXAMPLE: MODIFICATION HISTORY: $Id: strcnt.pro 114 2006-06-19 14:14:56Z smasson $ $Log: strcnt.pro,v $ Revision 1.3 1996/06/14 20:00:27 mcraig Updated Copyright info. Revision 1.2 1996/05/09 00:22:17 mcraig Added fast processing using BYTE arrays if we are counting occurences of a single character. Added error handling. Revision 1.1 1996/01/31 18:47:37 mcraig Initial revision RELEASE: $Name: Rel_1_2 $ COPYRIGHT: Copyright (C) 1996 The Regents of the University of California, All Rights Reserved. Written by Matthew W. Craig. See the file COPYRIGHT for restrictions on distrubting this code. This code comes with absolutely NO warranty; see DISCLAIMER for details.

Parameters

strn       

substrn       

startpos       

Keywords

HELP       

Produced by IDLdoc 2.0.