Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
tokenize("one^|uno||three^^^^|four^^^|^cuatro|", "|", "^")
|
||||
|
||||
func tokenize(src, sep, esc)
|
||||
field = 1
|
||||
escaping = false
|
||||
see "" + field + " "
|
||||
for i = 1 to len(src)
|
||||
char = substr(src, i, 1)
|
||||
if escaping
|
||||
see char
|
||||
escaping = false
|
||||
else
|
||||
switch char
|
||||
on sep
|
||||
see nl
|
||||
field = field + 1
|
||||
see "" + field + " "
|
||||
on esc
|
||||
escaping = true
|
||||
other
|
||||
see char
|
||||
off
|
||||
ok
|
||||
next
|
||||
see nl
|
||||
Loading…
Add table
Add a link
Reference in a new issue