Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
Sub tokenize(cadena As String, separador As String, escape As String)
|
||||
Dim As Integer campo = 1
|
||||
Dim As Boolean escapando = false
|
||||
Dim As String char
|
||||
Print ""; campo; " ";
|
||||
|
||||
For i As Integer = 1 To Len(cadena)
|
||||
char = Mid(cadena, i, 1)
|
||||
If escapando Then
|
||||
Print char;
|
||||
escapando = false
|
||||
Else
|
||||
Select Case char
|
||||
Case separador
|
||||
Print
|
||||
campo += 1
|
||||
Print ""; campo; " ";
|
||||
Case escape
|
||||
escapando = true
|
||||
Case Else
|
||||
Print char;
|
||||
End Select
|
||||
End If
|
||||
Next i
|
||||
Print
|
||||
End Sub
|
||||
|
||||
tokenize("one^|uno||three^^^^|four^^^|^cuatro|", "|", "^")
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue