[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
[Uni logo]


STRCNT Source code in strcnt.pro

STRCNT

Name
       STRCNT
Purpose
       Count number of occurrences of a substring in a string.
Category
       text/strings
Calling Sequence
       num = strcnt(strn, substring, [pos])
Input Parameters
       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.
Output Parameters
       num       -- Number of occurances of substring in string. out
Common Blocks

Side Effects

Note
       Overlapping occurances are not counted separately.  For
       example, counting occurances of 'bb' in 'blah bbb' returns one
       occurance.
Example

Revision History
       $Id: strcnt.pro,v 1.3 1996/06/14 20:00:27 mcraig Exp $
       $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_2_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.

Last modified by pro2html on 2004 June 29 at 21:24 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically