Hi,
this is Chakra and it's my First Post.
I want to share some useful Functions with you.
Code:Public Function Gettoks(ByVal GettokText As String, ByVal GettokStr As String) As Integer 'it returns the total number of matching tokens. Gettoks = GettokText.Split(GettokStr).Length End Function Public Function Gettok(ByVal GettokText As String, ByVal GettokNum As Integer, ByVal GettokStr As String) As String Dim GettokTmp As String() = Nothing GettokNum = GettokNum - 1 GettokTmp = GettokText.Split(GettokStr) Try 'Returns the Nth token in text. Gettok = GettokTmp(GettokNum) Catch ex As Exception Gettok = Nothing End Try End Function Public Function Remove(ByRef sText As String, ByRef strText As String) As String 'Removes any occurrence of strText in sText. Remove = Replace(sText, strText, "") End Function Public Function isin(ByVal sText As String, ByVal StrText As String) As Boolean 'it will check if the StrText is in the sText If Len(Text) > Len(Replace(sText, StrText, "")) Then isin = True Else isin = False End If End Function


LinkBack URL
About LinkBacks
Reply With Quote
