VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Tokenizer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit
Dim s As String, i As Integer
Dim sep As String

Public Sub init(st As String)
  s = st
End Sub

Private Sub Class_Initialize()
  sep = ","
End Sub

Public Sub setSeparator(sp As String)
  sep = sp
End Sub

Public Function nextToken() As String
  Dim tok$
  i = InStr(s, sep)
  If i > 0 Then
    tok$ = Left$(s, i - 1)
    s = Trim$(Right$(s, Len(s) - i))
  Else
    tok$ = s
    s = ""
  End If
  nextToken = tok$
End Function
