18 lines
624 B
C
18 lines
624 B
C
#ifndef _fencer_strutil_h
|
|
#define _fencer_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 // !_fencer_strutil_h
|