Class Module
60 Members
★ 1 Top 20
String Searches Class
Entisoft Tools 2.0 Object Library · StringSearches · 56 Functions · 0 Properties · 3 Subroutines
Declarations
Declarations
The functions in this group perform string search operations. Copyright 1998 Entisoft
Section
AverageLengthAnyPart
Average Length Any Part
Return the average length of any part of a string. Does not include the length of the string which separates the parts in the average. The "parts" of the string are the sub-strings between occurrences of the string vPartSeparator.
Function
CountCharacters
Count Characters
Count the number of occurrences of the characters in vFindChars within string vLine.
Function
CountLeadingStrings
Count Leading Strings
Count the number of occurrences of one string at the beginning of another.
Function
CountLines
Count Lines
Count the number of lines within a string. Works for Windows, DOS, and UNIX strings since it considers the line feed character to be the line terminator.
Function
CountOverlappingMatches
Count Overlapping Matches
Count the number of (possibly-overlapping) occurrences of the string vFind within vLine.
Function
CountStrings
Count Strings
Count the number of (non-overlapping) occurrences of the string vFind within vLine.
Function
CountTrailingStrings
Count Trailing Strings
Count the number of occurrences of one string (vFind) at the end of another (vLine).
Function
FirstLowerCaseForward
First Lower Case Forward
Return the string vLine starting with the first lower-case character. Skips all of the characters in vLine up to the first lower-case character. Uses the Visual Basic UCase$() function and not the built-in character classification routines.
Function
FirstMatchingCharacter
First Matching Character
Returns the first character within string vLine that matches any of the characters within string vFindChars.
Function
FirstMatchingPosition
First Matching Position
Returns the position of the first matching characters in corresponding positions of the two strings.
Function
FirstNonLowerCaseForward
First Non Lower Case Forward
Return the string vLine starting with the first non-lower-case character. Skips all of the characters in vLine up to the first non-lower-case character. Uses the Visual Basic UCase$() function and not the built-in character classification routines.
Function
FirstNonMatchingCharacter
First Non Matching Character
Returns the first character within string vLine that does not match any of the characters within string vFindChars.
Function
FirstNonMatchingPosition
First Non Matching Position
Returns the position of the first non-matching characters in corresponding positions of the two strings.
Function
FirstNonUpperCaseForward
First Non Upper Case Forward
Return the string vLine starting with the first non-upper-case character. Skips all of the characters in vLine up to the first non-upper-case character. Uses the Visual Basic LCase$() function and not the built-in character classification routines.
Function
FirstUpperCaseForward
First Upper Case Forward
Return the string vLine starting with the first upper-case character. Skips all of the characters in vLine up to the first upper-case character. Uses the Visual Basic LCase$() function and not the built-in character classification routines.
Function
GetPossiblyQuotedField
Get Possibly Quoted Field
Remove the first (possibly quoted) value from a string and return that value. Similar to the GetToken functions, except that token can appear within quotes.
Function
GetToken
Get Token
Remove the first token from the argument and return the token. The tokens are separated by the string vTokenSep.
Function
GetTokenAlphanumeric
Get Token Alphanumeric
"Get Alphanumeric Token" Remove the first alphanumeric token from the argument and return the token. Function skips leading non-alphanumeric characters (spaces, tabs, symbols, punctuation, etc.) before returning the first alphanumeric token.
Function
GetTokenBufferedFast
Get Token Buffered Fast
Remove the first token from the argument and return the token. The tokens are separated by the string vTokenSep. Special version of the GetToken Function which has restrictive argument types to avoid argument fix up overhead AND also works very efficiently on large strings.
Function
GetTokenCharSeps
Get Token Char Seps
"Get Token With Character Separators" Remove the first token from the argument and return the token. The tokens are separated by any of the characters within string vCharSeps.
Function
GetTokenFast
Get Token Fast
Remove the first token from the argument and return the token. The tokens are separated by the string vTokenSep. Faster version of the GetToken function which has restrictive argument types to avoid argument fix up overhead.
Function
GetTokenNonSpace
Get Token Non Space
"Get Non-space Token" Remove the first non-space token from the argument and return the token. Function skips leading space-type characters (spaces, tabs, line feeds, etc.) before returning the first token.
Function
IndicateMatches
Indicate Matches
Indicate which non-overlapping portions of one string match a specific string. Function includes the original string followed carriage return and line feed and then the string which indicates the matching portion using up-caret characters."
Function
InStrCharacters
In Str Characters
"In String Characters" Return the first position within string vLine of any of the characters within vFindChars.
★ Top 20
Function
InStrCharactersBinary
In Str Characters Binary
"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.
Function
InStrCharactersFast
In Str Characters Fast
"In String Characters (Fast)" Return the first position within string vLine of any of the characters within vFindChars. Faster version of the InStrCharacters function which uses restrictive argument types to avoid argument fix-up code.
Function
InStrCharactersReverse
In Str Characters Reverse
"In String Characters Reverse" Return the last position within string vLine of any of the characters within vFindChars. Similar to the InStrCharacters function except that this one searches the string vLine from right-to-left.
Function
InStrCharactersReverseFast
In Str Characters Reverse Fast
"In String Characters Reverse (Fast)" Return the last position within string vLine of any of the characters within vFindChars. Faster version of the InStrCharacters function which uses restrictive argument types to avoid argument fix-up code.
Function
InStrNotCharacters
In Str Not Characters
"In String Not Characters" Return the position of the first character in vLine that is NOT in vFindChars.
Function
InStrNotCharactersReverse
In Str Not Characters Reverse
"In String Not Characters Reverse" Return the position of the last character in vLine that is NOT in vFindChars.
Function
InStrReverse
In Str Reverse
"In String Reverse" Find the last occurrence of one string within another. Similar to the Visual Basic InStr function except that it searches backwards from the end of string vLine. Different from the InStr function in that it returns 0 if vFind is an empty string.
Function
InStrReverseFast
In Str Reverse Fast
"In String Reverse (Fast)" Find the last occurrence of one string within another. Faster version of the InStrReverse function which uses restrictive argument types to avoid argument fix-up code.
Function
InStrToVariantVector
In Str To Variant Vector
"In String To Variant Vector" Creates a list of all of the non-overlapping positions of one string within another string.
Function
LastMatchingCharacter
Last Matching Character
Returns the last character within string vLine that matches any of the characters within string vFindChars.
Function
LastNonMatchingCharacter
Last Non Matching Character
Returns the first character within string vLine that does not match any of the characters within string vFindChars.
Function
LeftOfFirstMatch
Left Of First Match
Return the portion of vLine before the first occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned.
Function
LeftOfFirstMatchFast
Left Of First Match Fast
Return the portion of vLine before the first occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned. Faster version of the LeftOfFirstMatch function which uses restrictive argument types to avoid argument fix-up code.
Function
LeftOfLastMatch
Left Of Last Match
Return the portion of vLine before the last occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned.
Function
LeftOfLastMatchFast
Left Of Last Match Fast
Return the portion of vLine before the last occurrence of vFind, else return vIfNotFound. Faster version of the LeftOfLastMatch function which uses restrictive argument types to avoid argument fix-up code. If a match is found, it does not include the matching text in the string that is returned.
Function
LineBeginsWith
Line Begins With
Returns True if the string vLine begins with the string vFind.
Function
LineBeginsWithFast
Line Begins With Fast
Returns True if the string vLine begins with the string vFind. Faster version of the LineBeginsWith function which uses restrictive argument types to avoid argument fix-up code.
Function
LineEndsWith
Line Ends With
Returns True if the string vLine ends with the string vFind.
Function
LineEndsWithFast
Line Ends With Fast
Returns True if the string vLine ends with the string vFind. Faster version of the LineEndsWith function which uses restrictive argument types to avoid argument fix-up code.
Function
MatchesInContext
Matches In Context
Return a string containing all of the occurrences of vFind within vSearch, and include up to vContextChars characters of the surrounding text on each side of the match.
Function
MaxCorrespondingCharacters
Max Corresponding Characters
" Maximum Corresponding Characters" Return a string where each character represents the maximum ASCII value of the characters in the corresponding position within all of the string arguments. Will return the character from the first string with the maximum value if many characters tie for the maximum.
Function
MaxLengthAnyPart
Max Length Any Part
" Maximum Length Any Part" Return the maximum length of any part of the input string, after the string has been separated at each occurrence of the vPartSep string.
Function
MinCorrespondingCharacters
Min Corresponding Characters
" Minimum Corresponding Characters" Return a string where each character represents the minimum ASCII value of the characters in the corresponding position within all of the string arguments. Will return the character from the first string with the minimum value if many characters tie for the minimum.
Function
MinLengthAnyPart
Min Length Any Part
" Minimum Length Any Part" Return the minimum length of any part of the input string, after the string has been separated at each occurrence of the vPartSep string.
Function
RightOfFirstMatch
Right Of First Match
Return the portion of vLine after the first occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned.
Function
RightOfFirstMatchFast
Right Of First Match Fast
Return the portion of vLine after the first occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned. Faster version of the RightOfFirstMatch function which uses restrictive argument types to avoid argument fix-up code.
Function
RightOfLastMatch
Right Of Last Match
Return the portion of vLine after the last occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned.
Function
RightOfLastMatchFast
Right Of Last Match Fast
Return the portion of vLine after the last occurrence of vFind, else return vIfNotFound. If a match is found, it does not include the matching text in the string that is returned. Faster version of the RightOfLastMatch function which uses restrictive argument types to avoid argument fix-up code.
Function
StringBetweenStrings
String Between Strings
Return the string between the first occurrences of vRight and vLeft.
Function
StringBetweenStringsFast
String Between Strings Fast
Return the string between the first occurrences of vRight and vLeft. Faster version of the StringBetweenStrings function which uses restrictive argument types to avoid argument fix-up code.
Function
StringsBetweenStrings
Strings Between Strings
Return the strings between all occurrences of vRight and vLeft. If more than one match is found, the matches are separated by vSeparator. Return a blank string if there is no match of vLeft followed by vRight.
Function
StringsBetweenStringsFast
Strings Between Strings Fast
Return the strings between the all occurrences of vRight and vLeft. If more than one match is found, the matches are separated by vSeparator. Return a blank string if there is no match of vLeft followed by vRight. Faster version of the StringaBetweenStrings function which uses restrictive argument types to avoid argument fix-up code.
Function
GetTokenFastSample
Get Token Fast Sample
View VB6 signature, parameters, and usage notes.
Sub
GetTokenSample
Get Token Sample
View VB6 signature, parameters, and usage notes.
Sub
MatchesInContextSample
Matches In Context Sample
View VB6 signature, parameters, and usage notes.
Sub