Compare commits

..

No commits in common. "2fab31d822c36b0cbfe85e74008bb62898041717" and "a39e4a780d4e8e0344a05577d27a5a1af9956514" have entirely different histories.

3 changed files with 5 additions and 26 deletions

View File

@ -1,14 +0,0 @@
contain_only(to_big, to_find)
{
local tmp;
tmp = to_big;
loop
{
if ([tmp] == 0)
return 1;
if (strchr(to_find, [tmp]) == 0)
return 0;
tmp++;
}
}

View File

@ -1,12 +1,12 @@
strchr(str, c) strchr(str, c)
{ {
local start = str; local i = 0;
loop { loop {
if ([start] == c) if ([str + i] == c)
return (start); return (str + i);
if ([start] == 0) if ([str + i] == 0)
return (0); return (0);
start++; i++;
} }
} }

View File

@ -1,7 +0,0 @@
main()
{
name = "contain_only";
test_num(contain_only("17", "0123456789"), 1, "");
test_num(contain_only("17a", "0123456789"), 0, "");
}