Jump to content

Multisplit: Difference between revisions

Added Delphi example
(Updated to work with Nim 1.4: added missing parameter type, replaced ".. <" with "..< ".)
(Added Delphi example)
Line 520:
{{out}} (separator locations indicated by braces):
<pre>a {} {} b {} {} c</pre>
=={{header|Delphi}}==
{{libheader| System.SysUtils}}
<lang Delphi>
program Multisplit;
 
{$APPTYPE CONSOLE}
 
uses
System.SysUtils;
 
begin
write('[');
for var s in 'a!===b=!=c'.Split(['==', '!=', '=']) do
write(s.QuotedString('"'), ' ');
write(']');
readln;
end.</lang>
{{out}}
<pre>["a" "" "b" "" "c" ]</pre>
=={{header|Elixir}}==
{{trans|Erlang}}
Line 531 ⟶ 549:
["a",[],"b",[],"c"]
</pre>
 
 
=={{header|F_Sharp|F#}}==
478

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.