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

ToBeReviewed/STRING/

strwhere.pro

return position *array* for occurrence of a character in a string

topstrwhere String

result = strwhere(str, schar, Count)

Return value

The number of matches that were found The function returns an index array similar to the result of the where function

Parameters

str        in required

the string

schar        in required

the character to look for

Count       

Examples

IDL> ind = strwhere('abcabcabc','a') IDL> print, ind [ 0, 3, 6 ]

Version history

Version

$Id: strwhere.pro 238 2007-03-27 13:43:18Z pinsard $

History

mgs, 02 Jun 1998: VERSION 1.00 bmy, 30 Jun 1998: - now returns COUNT, the number of matches that are found (this is analogous to the WHERE command)

Statistics

McCabe cyclic 2
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.