diff options
Diffstat (limited to 'runtime/klee-libc/strrchr.c')
-rw-r--r-- | runtime/klee-libc/strrchr.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/runtime/klee-libc/strrchr.c b/runtime/klee-libc/strrchr.c new file mode 100644 index 00000000..01128b48 --- /dev/null +++ b/runtime/klee-libc/strrchr.c @@ -0,0 +1,21 @@ +//===-- strrchr.c ---------------------------------------------------------===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include <string.h> + +char *strrchr(const char *t, int c) { + char ch; + const char *l=0; + + ch = c; + for (;;) { + if (*t == ch) l=t; if (!*t) return (char*)l; ++t; + } + return (char*)l; +} |