non-utf8-decoding regex (for speed)?
Timothee Cour via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 5 15:00:36 PDT 2016
Is there a way to avoid decoding (as utf8) when calling regex' apis?
or a plan to do so?
use case: speed (no decoding) and avoiding throwing on invalid utf8 sequences
ideally this should allow:
---
auto s = cast(ubyte[]) "abcd"; //potentially not valid utf8 sequence
auto r = cast(ubyte[]) `^\d`;
auto m=match(s, r.regex); // right now: regex cannot deduce function
from argument types !()(ubyte[])
---
More information about the Digitalmars-d
mailing list