converting to/from char[]/string

Adam D. Ruppe destructionator at gmail.com
Thu Mar 5 13:31:14 UTC 2020


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: 
> https://tartarus.org/martin/PorterStemmer/d.txt

I think I (or ketmar and I stole it from him) ported that very 
same file before:

https://github.com/adamdruppe/adrdox/blob/master/stemmer.d

By just adding `const` where appropriate it becomes compatible 
with string and you can slice to take care of the size thing.

https://github.com/adamdruppe/adrdox/blob/master/stemmer.d#L512

is that stem function as a const slice


More information about the Digitalmars-d-learn mailing list