VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Version 2, of My Advanced String Function now with added Assembler ideals and notes. This Function

DoctorMO & Dave Edwards  (2 Submissions)   String Manipulation   Visual Basic 3.0   Unknown Difficulty   Fri 22nd June 2001   Mon 8th February 2021

Version 2, of My Advanced String Function now with added Assembler ideals and notes. This Function Replaces the Standard InStr (VB 5+) and

API Declarations


' Replacement function for InStr() (VB 1.0 onwards) and InStrRev()
' VB 6 onwards).

' Synopsis:

' InStrEx(StartPos As Long, SourceString As String,
' SearchString As String,
' Optional IS_Mode As Long = 1,
' Optional OrdSelector As Integer) As Long
'
' StartPos is the character position from where the search
' begins (1=first character of SourceString, etc)
' If omitted (or equals zero), then function intelligently
' coerces this value to a sensible one.

' SourceString is the string within which the search is performed.

' SearchString is the string being sarched for.

' IS_Mode : range of flags specified by the following constants:

' IS_Mode_For : specifies forward search through the SourceString
' (StarPos default = 1)

' IS_Mode_Back : specifies backward search throuhgh the
' SourceString (StartPos default = length
' of SourceString)

' IS_Mode_Number : Specifies that the search is to find the
' NUMBER of occurrences of SearchString in
' SourceString, starting from the given
' start position, and searching in the
' relevant direction.

' IS_Mode_NoCase : if added to any combination of the above,
' specifies that the search is to be case
' INSENSITIVE (default is case sensitive).
'
' These constants can be added (bitwise) to combine modes, e.g.,
' IS_Mode_Back + IS_Mode_Number will search backwards from the
' specified search starting position, and count how many
' occurrences of SearchString it has found in SourceString.
' If no further occurrences of SearchString are found from the
' chosen search point, then InStrEx() returns zero (naturally
' enough).

' OrdSelector is the Ordinal Selector, i.e., specifies WHICH
' occurrence of SearchString is to be searched for (not valid
' in conjunction with IS_Mode_Number).

Rate Version 2, of My Advanced String Function now with added Assembler ideals and notes. This Function (1(1 Vote))
Version 2, of My Advanced String Function now with added Assembler ideals and notes. This Function .bas

Version 2, of My Advanced String Function now with added Assembler ideals and notes. This Function Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters