fixedstring: a @safe, @nogc string type

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 13 00:12:24 UTC 2022


On Wed, Jan 12, 2022 at 07:55:41PM +0000, Moth via Digitalmars-d-announce wrote:
> On Tuesday, 11 January 2022 at 17:55:28 UTC, H. S. Teoh wrote:
[...]
> > One minor usability issue I found just glancing over the code: many
> > of your methods take char[] as argument. Generally, you want
> > const(char)[] instead, so that it will work with both char[] and
> > immutable(char)[]. No reason why you can't copy some immutable chars
> > into a FixedString, for example.
> 
> they should all already be `in char[]`? i've added a test to confirm
> it works with both `char[]` and `immutable(char)[]` and it compiles
> fine.
[...]

Oh you're right!  I totally missed that.  Sorry, my bad.


T

-- 
Talk is cheap. Whining is actually free. -- Lars Wirzenius


More information about the Digitalmars-d-announce mailing list