Multisplit: Difference between revisions
F#: Nothing wrong here: != preceeds = in string so is allowed to match
(+Java, F# incorrect) |
(F#: Nothing wrong here: != preceeds = in string so is allowed to match) |
||
Line 43:
=={{header|F_Sharp|F#}}==
If we ignore the "Extra Credit" requirements and skip 'ordered separators' condition (i.e. solving absolute different task), this is exactly what one of the overloads of .NET's <code>String.Split</code> method does. Using F# Interactive:
<lang fsharp>> "a!===b=!=c".Split([|"=="; "!="; "="|], System.StringSplitOptions.None);;
|