Added command autocomplete

This commit is contained in:
James Booth
2012-06-04 23:59:09 +01:00
parent 467b5cce7e
commit 6bb120200e
6 changed files with 59 additions and 2 deletions

11
util.c
View File

@@ -78,3 +78,14 @@ char * str_replace (const char *string, const char *substr,
return newstr;
}
int str_contains(char str[], int size, char ch)
{
int i;
for (i = 0; i < size; i++) {
if (str[i] == ch)
return 1;
}
return 0;
}