Public Function Contains(str As String, ContainsString As String) As Boolean
Does the string contain the passed string ?
.NET equivalent functions
Facilitates cut and paste of C#/VB .NET samples from the web, but noting that VBA string indexing is 1 based not 0 based.
Does the string contain the passed string ?
Does the string end with the passed string ?
Get the 1 based index of the first occurrence of the search string in the passed string. Returns -1 if the search string is not found.
Inserts SubString into the string at StartPosition
Get the 1 based index of the last occurrence of the search string in the passed string
Pad out the string with characters from the left until it is TotalWidth wide. If the string is TotalWidth chars wide or wider already, it is returned unmodified. This function does not truncate strings: see FixedWidthStr to pad and truncate.
Pad out the string with characters from the right until it is TotalWidth wide. If the string is TotalWidth chars wide or wider already, it is returned unmodified. This function does not truncate strings: see FixedWidthStr to pad and truncate.
Remove characters from StartPosition to end, or for Length characters
Same as the VBA builtin 'Replace', but having it here allows easy selection of case sensitivity
Does the string start with the passed string ?
Get the substring at the position and length: identical to the built in Mid function. Returns an error if the StartPosition is beyond the string end. See SafeMid for a fault tolerant version.
Convert the string to lower case
Convert the string to lower case
Trim whitespace (space, tab, CR, LF) and additonal defined chars from the start and end of the string.
Trim whitespace (space, tab, CR, LF) and additional defined chars from the end of the string.
Trim whitespace (space, tab, CR, LF) and additional specified chars from the start of the string.