diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index a794f9b..8e7bed7 100644 --- a/src/utils.c +++ b/src/utils.c @@ -275,3 +275,16 @@ char *device_lock(const char *path) return lock; } + +int indexOfChar(const char *array, int len, char character) +{ + int i; + + for (i = 0; i < len; i++) { + if (array[i] == character) { + return i; + } + } + return -1; +} + |