Document Library for WinForms | ComponentOne
C1.Win.Document.8 Assembly / C1.Win.Document Namespace / Utils Class / FindTextInstances Method
The text to search for.
The string to search.
Index in "where" to start search at.
Length of substring to search in.
Max number of instances to find.
Search direction.
Ignore case.
Whole word search.

In This Topic
    FindTextInstances Method (Utils)
    In This Topic
    Finds instances of text in a string.
    Syntax
    'Declaration
     
    Public Shared Function FindTextInstances( _
       ByVal what As String, _
       ByVal where As String, _
       ByVal fromIdx As Integer, _
       ByVal length As Integer, _
       ByVal maxCount As Integer, _
       ByVal forward As Boolean, _
       ByVal matchCase As Boolean, _
       ByVal word As Boolean _
    ) As IList(Of Integer)
    public static IList<int> FindTextInstances( 
       string what,
       string where,
       int fromIdx,
       int length,
       int maxCount,
       bool forward,
       bool matchCase,
       bool word
    )

    Parameters

    what
    The text to search for.
    where
    The string to search.
    fromIdx
    Index in "where" to start search at.
    length
    Length of substring to search in.
    maxCount
    Max number of instances to find.
    forward
    Search direction.
    matchCase
    Ignore case.
    word
    Whole word search.

    Return Value

    Array of indexes into "where" to the found instances.
    See Also