Elegant way to test if members of array A are present in array B?

KnightMare black80 at bk.ru
Tue Jun 11 18:39:38 UTC 2019


On Tuesday, 11 June 2019 at 17:12:17 UTC, Robert M. Münch wrote:
> Is there a simple and elegant way to do this? Or is just using 
> a foreach(...) with canFind() the best way?

not elegant, not simple. for byte/short/ubye/ushort only
https://www.strchr.com/strcmp_and_strlen_using_sse_4.2
https://dlang.org/spec/iasm.html

probably strstr 
https://dlang.org/library/core/stdc/string/strstr.html 
implemented over it. there is a tendency to remove dependency 
from C-runtime.


More information about the Digitalmars-d-learn mailing list