now available on dub: https://code.dlang.org/packages/fixedstring
On Wed, Jan 12, 2022 at 07:55:41PM +, 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
> >
On Wednesday, 12 January 2022 at 19:55:41 UTC, Moth wrote:
[snip]
Another issue is the way concatenation is implemented. Since
FixedStrings have compile-time size, this potentially means
every time you concatenate a string in your code you get
another instantiation of FixedString. This can
On Tuesday, 11 January 2022 at 17:55:28 UTC, H. S. Teoh wrote:
[snip]
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
On Tuesday, 11 January 2022 at 12:22:36 UTC, WebFreak001 wrote:
[snip]
you can relatively easily find out how many bytes a string
takes up with `std.utf`. You can also iterate by code points or
graphemes there if you want to translate some kind of character
index to byte position.
HOWEVER
On Tuesday, 11 January 2022 at 17:55:28 UTC, H. S. Teoh wrote:
Generally, I'd advise not conflating your containers with
ranges over your containers: I'd make .opSlice return a
traditional D slice (i.e., const(char)[]) instead of a
FixedString, and just require writing `[]` when you need to
On Tue, Jan 11, 2022 at 11:16:13AM +, Moth via Digitalmars-d-announce wrote:
> On Tuesday, 11 January 2022 at 03:20:22 UTC, Salih Dincer wrote:
> > [snip]
>
> glad to hear you're finding it useful! =]
One minor usability issue I found just glancing over the code: many of
your methods take
On Tuesday, 11 January 2022 at 11:16:13 UTC, Moth wrote:
On Tuesday, 11 January 2022 at 03:20:22 UTC, Salih Dincer wrote:
[snip]
glad to hear you're finding it useful! =]
hm, i'm not sure how i would go about fixing that double
character issue. i know there's currently some wierdness with
On Tuesday, 11 January 2022 at 11:16:13 UTC, Moth wrote:
On Tuesday, 11 January 2022 at 03:20:22 UTC, Salih Dincer wrote:
[snip]
glad to hear you're finding it useful! =]
... i know there's currently some wierdness with wchars /
dchars equality that needs to be fixed [shouldn't be too much
On Tuesday, 11 January 2022 at 03:20:22 UTC, Salih Dincer wrote:
[snip]
glad to hear you're finding it useful! =]
hm, i'm not sure how i would go about fixing that double
character issue. i know there's currently some wierdness with
wchars / dchars equality that needs to be fixed [shouldn't
On Monday, 10 January 2022 at 12:55:28 UTC, Moth wrote:
have fun =]
https://github.com/Moth-Tolias/fixedstring
I try Fixedstring and, to my great relief I got the results I
expected. Thank you, good luck with your work.
So how to fix this double character issue:
```d
FixedString!6 sugar =
On Monday, 10 January 2022 at 14:06:27 UTC, Moth wrote:
On Monday, 10 January 2022 at 13:12:13 UTC, jmh530 wrote:
You might add some examples to the Readme.md
good observation, i'll work on that. in the meantime the
examples in the unittests should suffice.
fixed.
for those who don't
On Monday, 10 January 2022 at 13:12:13 UTC, jmh530 wrote:
You might add some examples to the Readme.md
good observation, i'll work on that. in the meantime the examples
in the unittests should suffice.
On Monday, 10 January 2022 at 12:55:28 UTC, Moth wrote:
hi all.
i got fed up with the built-in string type having so many
features unavailable in `@nogc` code, so i made my own.
introducing fixedstring: a templated fixed-length array of
`char`s, compatible with `@safe`, `@nogc`, and
On Monday, 10 January 2022 at 12:55:28 UTC, Moth wrote:
hi all.
Good.Let's use `betterC`.
15 matches
Mail list logo