Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
F token_with_escape(a, escape = ‘^’, separator = ‘|’)
|
||||
[String] result
|
||||
V token = ‘’
|
||||
V state = 0
|
||||
L(c) a
|
||||
I state == 0
|
||||
I c == escape
|
||||
state = 1
|
||||
E I c == separator
|
||||
result.append(token)
|
||||
token = ‘’
|
||||
E
|
||||
token ‘’= c
|
||||
E I state == 1
|
||||
token ‘’= c
|
||||
state = 0
|
||||
result.append(token)
|
||||
R result
|
||||
|
||||
print(token_with_escape(‘one^|uno||three^^^^|four^^^|^cuatro|’).map(s -> ‘'’s‘'’).join(‘, ’))
|
||||
Loading…
Add table
Add a link
Reference in a new issue