wmemchar for unix
monarch_dodra
monarchdodra at gmail.com
Tue Aug 27 10:02:02 PDT 2013
On Tuesday, 27 August 2013 at 14:37:14 UTC, Sean Kelly wrote:
> On Aug 26, 2013, at 11:57 PM, monarch_dodra
> <monarchdodra at gmail.com> wrote:
>
>> For performance reasons, I need a "w" version of memchr.
>>
>> C defines wmemchr as:
>> wchar_t * wmemchr ( const wchar_t *, wchar_t, size_t );
>>
>> Unfortunatly, on unix, "wchar_t" is defined a *4* bytes long,
>> making wmemchr, effectivelly, "dmemchr".
>>
>> Are there any "2 byte" alternatives for wmemchr on unix?
>
> Why not cast the array to ushort[] and do a find()? Or is that
> too slow as well?
Because it's specifically to speed up find's implementation ^^
More information about the Digitalmars-d-learn
mailing list