18 lines
618 B
C
18 lines
618 B
C
#ifndef CUTES_STRUTIL_H
|
|
#define CUTES_STRUTIL_H
|
|
|
|
#include "stdlib.h"
|
|
#include "stdint.h"
|
|
|
|
typedef int(*CharPredFn)(int);
|
|
|
|
extern uintptr_t strnhash(const char* s, size_t n);
|
|
extern uintptr_t strhash(const char* s);
|
|
extern long strlast(const char* rbegin, const char* rend, char search);
|
|
extern long strfirst(const char* begin, const char* end, char search);
|
|
extern long strcount(const char* begin, const char* end, char search);
|
|
extern long strfirst_pred(const char* begin, const char* end, CharPredFn pred);
|
|
extern long strlast_pred(const char* rbegin, const char* rend, CharPredFn pred);
|
|
|
|
#endif // !CUTES_STRUTIL_H
|