Accessing non-binary Unicode properties with std.uni
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Sep 29 19:32:48 UTC 2020
On Tue, Sep 29, 2020 at 06:14:45PM +0000, Chloé Kekoa via Digitalmars-d-learn wrote:
> On Tuesday, 29 September 2020 at 17:04:51 UTC, H. S. Teoh wrote:
> > OTOH, the relevant Unicode data file that contains East_Asian_Width
> > data (EastAsianWidth.txt) is relatively straightforward to parse.
> > In one of my projects, I wrote a little helper program to parse this
> > file and generate a function that tells me if a given dchar is wide
> > or narrow.
>
> Thank you. Analyzing the data file seems simple enough. :)
If you're daring, you can try parsing it at compile-time... but in this
case, it's kinda pointless, since the data file doesn't change, so
statically generating the desired code as a separate step seems a more
logical thing to do.
T
--
Curiosity kills the cat. Moral: don't be the cat.
More information about the Digitalmars-d-learn
mailing list