> function delimCount strr, del
>     put the itemDelimiter into saveDelim
>     set the itemDelimiter to del
>     get the number of items in strr
>     if the last char of strr is del then add 1 to it
>     set the itemDelimiter to saveDelim
>     return it
> end delimCount

This one is slightly faster, but is less lines:

function delimCount tStr,tDel
  replace tDel with CR in tStr
  return the number of lines of (tStr & null)
end delimCount

Also note that a modified form of this can be used to count any number of
characters in a string:

function charCount tStr,tChar
  if tChar <> CR then replace CR with "" in tStr
  replace tChar with CR in tStr
  return the number of lines of (tStr & null)
end charCount

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to