www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - A D port of utf8proc

reply Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
I could not find a similar library working with -betterC, so I 
ported utf8proc.

https://github.com/aferust/utf8proc-d

Please test it, contribute it, and enjoy!
Apr 11
next sibling parent reply =?utf-8?Q?Robert_M._M=C3=BCnch?= <robert.muench saphirion.com> writes:
On 2020-04-11 23:36:17 +0000, Ferhat Kurtulmuş said:

 I could not find a similar library working with -betterC, so I ported utf8proc.
 
 https://github.com/aferust/utf8proc-d
 
 Please test it, contribute it, and enjoy!
What does it provide more then std.utf and std.uni beside BetterC support? -- Robert M. Münch http://www.saphirion.com smarter | better | faster
Apr 12
parent Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Sunday, 12 April 2020 at 12:33:13 UTC, Robert M. Münch wrote:
 On 2020-04-11 23:36:17 +0000, Ferhat Kurtulmuş said:

 I could not find a similar library working with -betterC, so I 
 ported utf8proc.
 
 https://github.com/aferust/utf8proc-d
 
 Please test it, contribute it, and enjoy!
What does it provide more then std.utf and std.uni beside BetterC support?
I did not deeply dive into the library apart from porting it. I don't think that you will need it when phobos is available.
Apr 12
prev sibling parent reply MrSmith <mrsmith33 yandex.ru> writes:
On Saturday, 11 April 2020 at 23:36:17 UTC, Ferhat Kurtulmuş 
wrote:
 I could not find a similar library working with -betterC, so I 
 ported utf8proc.

 https://github.com/aferust/utf8proc-d

 Please test it, contribute it, and enjoy!
in readme this expression is wrong: `(mstring.sizeof / ubyte.sizeof) * mstring.length` should be `mstring.length` instead
Apr 12
parent reply MrSmith <mrsmith33 yandex.ru> writes:
On Sunday, 12 April 2020 at 13:34:49 UTC, MrSmith wrote:
 On Saturday, 11 April 2020 at 23:36:17 UTC, Ferhat Kurtulmuş 
 wrote:
 I could not find a similar library working with -betterC, so I 
 ported utf8proc.

 https://github.com/aferust/utf8proc-d

 Please test it, contribute it, and enjoy!
in readme this expression is wrong: `(mstring.sizeof / ubyte.sizeof) * mstring.length` should be `mstring.length` instead
Actually even `mstring.length + 1` to account for null byte. But you may pass mstring.length to `utf8proc_map` instead of 0 length.
Apr 12
parent Ferhat =?UTF-8?B?S3VydHVsbXXFnw==?= <aferust gmail.com> writes:
On Sunday, 12 April 2020 at 13:41:38 UTC, MrSmith wrote:
 On Sunday, 12 April 2020 at 13:34:49 UTC, MrSmith wrote:
 On Saturday, 11 April 2020 at 23:36:17 UTC, Ferhat Kurtulmuş 
 wrote:
 I could not find a similar library working with -betterC, so 
 I ported utf8proc.

 https://github.com/aferust/utf8proc-d

 Please test it, contribute it, and enjoy!
in readme this expression is wrong: `(mstring.sizeof / ubyte.sizeof) * mstring.length` should be `mstring.length` instead
Actually even `mstring.length + 1` to account for null byte. But you may pass mstring.length to `utf8proc_map` instead of 0 length.
got it thank you!
Apr 12