Перенос страниц

This commit is contained in:
Alexander Zhirov 2023-03-05 15:30:34 +03:00
parent 4d57446057
commit 4c954c9186
129 changed files with 14 additions and 15 deletions

View file

@ -0,0 +1,15 @@
T[] find(T, E)(T[] haystack, E needle)
if (is(typeof(haystack[0] != needle) == bool))
{
while (haystack.length > 0 && haystack[0] != needle)
{
haystack = haystack[1 .. $];
}
return haystack;
}
unittest
{
// assert(find([1, 2, 3], "Hello"));
assert(find([1, 2, 3], 1.0));
}