StrTok for VB.NET

Category:
C#, VB.NET, ASP.NET
Type:
Applications
Difficulty:
Intermediate
Author:
Nathan Moschkin

Version Compatibility: Visual Basic.NET

More information:
This function works like strTok in C/C++, but it is for VB.NET. An example how it works:

Dim s As String
        s = StrTok("This,is,a,test", ",")

        Do While s <> ""
            Debug.WriteLine(s) 'Writes each token, This, is, a,  
                                'and test
            s = StrTok(, ",")
        Loop

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: