converting to/from char/string
mark at qtrac.eu
Thu Mar 5 13:52:27 UTC 2020
On Thursday, 5 March 2020 at 13:31:14 UTC, Adam D. Ruppe wrote:
> On Thursday, 5 March 2020 at 11:03:30 UTC, mark wrote:
>> I want to use the Porter stemming algorithm.
>> There's a D implementation here:
> I think I (or ketmar and I stole it from him) ported that very
> same file before:
> By just adding `const` where appropriate it becomes compatible
> with string and you can slice to take care of the size thing.
> is that stem function as a const slice
I thought the problem was using char rather than dchar, but
I downloaded yours and it "just works": I didn't have to change
anything. (dscanner gives a couple of const/immutable hints which
I'll fix, but still.)
Might be good to ask to add yours to
https://tartarus.org/martin/PorterStemmer/ since it works and the
old one doesn't.
More information about the Digitalmars-d-learn