<-- Previous || Up || Next -->

Count Characters Function
String Searches Class

Public Function CountCharacters( _
      ByVal vLine As Variant _
    , ByVal vFindChars As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Count the number of occurrences of the characters in vFindChars within string vLine.

Examples:
    CountCharacters("This is a test.", "ti", vbBinaryCompare) = 4
    CountCharacters("This is a test.", "ti", vbTextCompare) = 5
See also:
    CountLines Function
    CountWords Function
    CountStrings Function
vLine: String whose characters that are also in vFindChars are to be counted. Function returns Null if vLine is Null or cannot be fixed up to a String.

vFindChars: The characters which are to be counted each time they occur in vLine. Function returns Null if vFindChars is Null or cannot be fixed up to a String.

vCompare: Specifies the type of comparison used to find matching characters. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.