diff options
Diffstat (limited to 'runtime/klee-libc/strlen.c')
-rw-r--r-- | runtime/klee-libc/strlen.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/klee-libc/strlen.c b/runtime/klee-libc/strlen.c new file mode 100644 index 00000000..e298410c --- /dev/null +++ b/runtime/klee-libc/strlen.c @@ -0,0 +1,17 @@ +//===-- strlen.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> + +size_t strlen(const char *str) { + const char *s = str; + while (*s) + ++s; + return s - str; +} |