Function String Searches Class

InStrCharactersBinary

"In String Chracters Binary" Return the first position within string vLine of any of the characters within vFindChars. Alternate algorithm which has different performance characteristics than the InStrCharacters function. This algorithm only works for Binary Comparison.

Signature (Visual Basic / VBA)

Public Function InStrCharactersBinary( _
      ByVal vStartPos As Variant _
    , ByVal vLine As Variant _
    , ByVal vFindChars As Variant _
    ) As Variant

Code Example

    InStrCharactersBinary(1, "cbaCBACBA", "ABC") = 4
    InStrCharactersBinary(4, "CBA123123", "ABC") = 0

Parameters

Parameter Description
vStartPos The character position in string vLine where the search is to begin. vStartPos defaults to 1 (one) if it is Null or cannot be fixed up to a number.
vLine The string which is to be searched from left-to-right for characters that appear in string vFindChars. Function returns Null if vLine is Null or cannot be fixed up to a String.
vFindChars String containing characters that are to be searched for within string vLine. Function returns Null if vFindChars is Null or cannot be fixed up to a String. Function returns 0 (zero) if vFindChars is an empty string. Function returns an 0 (zero) if none of the characters in string vFindChars appear within string vLine.