Hi.
In pure JS, we can split a string using an array as separator (please see "Splitting with an array as separator" here
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split>), e.g.:
var s = 's:foo.bar';
var a = s.split(/[:\.]/);
console.log(a);
(3) ["s", "foo", "bar"]So, is there any trick to do something like this in pure Pascal? I tried:
A := TJSString(S).split([':', '.']); // error at transpile time
A := TJSString(S).split(':', '.'); // error at transpile time
A := TJSString(S).split('/[:.]/'); // the JS got only a static stringSince the TJSString.split() signature allows only a static string as first parameter, calls like those above don't work at all, then as workaround I solved it using an asm block, however, it would be nice to allow pure Pascal in that.
Thanks in advance for any help!
