Tokenize a string with escaping: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(2 intermediate revisions by 2 users not shown)
Line 1,139:
=={{header|Elena}}==
{{trans|C#}}
ELENA 46.x :
<syntaxhighlight lang="elena">import extensions;
import extensions'routines;
Line 1,154:
bool escaping := false;
self.forEach::(ch)
{
if (escaping)
{
buffer.write:(ch);
escaping := false
}
Line 1,172:
else
{
buffer.write:(ch)
}
};
Line 1,184:
public program()
{
testcase.tokenize("|", "^").forEach:(printingLn)
}</syntaxhighlight>
{{out}}
Line 3,441:
<pre>one|uno, , three^^, four^|cuatro, </pre>
 
=={{header|V (Vlang)}}==
{{trans|Go}}
<syntaxhighlight lang="ecmascript">fn tokenize_string(s string, sep u8, escape u8) ?[]string {
Line 3,485:
=={{header|Wren}}==
{{trans|Kotlin}}
<syntaxhighlight lang="ecmascriptwren">var SPE = "\ufffe" // unused unicode character in Specials block
var SPF = "\uffff" // ditto
 
9,482

edits