User: Password:
|
|
Subscribe / Log in / New account

Of bytes and encoded strings

Of bytes and encoded strings

Posted Jan 23, 2014 14:17 UTC (Thu) by paulj (subscriber, #341)
In reply to: Of bytes and encoded strings by dlang
Parent article: Of bytes and encoded strings

You can know the length of the string, in terms of some unit of visible-character widths, you just need to use a better/more abstract data-structure than a byte-array + terminator. ;)


(Log in to post comments)

Of bytes and encoded strings

Posted Jan 24, 2014 3:37 UTC (Fri) by dlang (subscriber, #313) [Link]

> You can know the length of the string, in terms of some unit of visible-character widths, you just need to use a better/more abstract data-structure than a byte-array + terminator. ;)

My point was that unless you use a fixed-width font (which is _very_ unusual outside of programmer editors nowadays), there is no "unit of visible-character widths" that's meaningful


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds