File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1416,7 +1416,7 @@ if (isInputRange!InputRange &&
14161416 import core.stdc.string : memchr;
14171417 auto ptr = memchr(haystack.ptr, needle, haystack.length);
14181418 return ptr ?
1419- haystack[ptr - haystack.ptr .. $] :
1419+ haystack[cast ( char * ) ptr - haystack.ptr .. $] :
14201420 haystack[$ .. $];
14211421 }
14221422 return trustedMemchr (haystack, needle);
@@ -1593,10 +1593,13 @@ if (isInputRange!InputRange &&
15931593 E e2 = ' c' ;
15941594 assert (find (" 日c語" , ' c' ) == " c語" );
15951595 assert (find! ((a,b)=> a== b)(" 日c語" , ' c' ) == " c語" );
1596+ R r3 = " 0123456789" ;
1597+ E e3 = ' A' ;
1598+ assert (find (" 0123456789" , ' A' ).empty);
15961599 static if (E.sizeof >= 2 )
15971600 {
1598- R r3 = " hello world" ;
1599- E e3 = ' w' ;
1601+ R r4 = " hello world" ;
1602+ E e4 = ' w' ;
16001603 assert (find (" 日本語" , ' 本' ) == " 本語" );
16011604 assert (find! ((a,b)=> a== b)(" 日本語" , ' 本' ) == " 本語" );
16021605 }
You can’t perform that action at this time.
0 commit comments