Finds the first occurrence of one string within another.
Syntax
object.FindInString bstrTargetString, lStartChar, bstrFindString, lFlags, pbstrMarkedMatchString, plFirstChar, plCharCount, pbFound
Properties
The FindInString method syntax has these parts:
Part |
Description |
object |
An object expression that evaluates to an object in the Applies To list. |
bstrTargetString |
|
lStartChar |
Long. One-based index of character in target string at which to start the search. |
bstrFindString |
String. String to search for. |
lFlags |
Long. Search modifiers.
Valid entries: |
pbstrMarkedMatchString |
String. Returns sub-string extracted from target string with marker characters inserted. |
plFirstChar |
Long. Returns a one-based index of first character in the target string which is involved in the match with the find string. |
plCharCount |
Long. Returns the number of characters in the target string which were involved in the match of the find string. |
pbFound |
Boolean. Returns True if a match was found, False otherwise. If False, the pbstrMarkedMatchString is set to null. |
Remarks
The pbstrMarkedMatchString, plFirstChar, and plCharCount parameters provide the user with the information needed to perform a subsequent ReplaceInString operation.