1/* see copyright notice in squirrel.h */
2#ifndef _SQSTD_STRING_H_
3#define _SQSTD_STRING_H_
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9typedef unsigned int SQRexBool;
10typedef struct SQRex SQRex;
11
12typedef struct {
13 const SQChar *begin;
14 SQInteger len;
15} SQRexMatch;
16
17SQUIRREL_API SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error);
18SQUIRREL_API void sqstd_rex_free(SQRex *exp);
19SQUIRREL_API SQBool sqstd_rex_match(SQRex* exp,const SQChar* text);
20SQUIRREL_API SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end);
21SQUIRREL_API SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* text_end,const SQChar** out_begin, const SQChar** out_end);
22SQUIRREL_API SQInteger sqstd_rex_getsubexpcount(SQRex* exp);
23SQUIRREL_API SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp);
24
25SQUIRREL_API SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output);
26
27SQUIRREL_API SQRESULT sqstd_register_stringlib(HSQUIRRELVM v);
28
29#ifdef __cplusplus
30} /*extern "C"*/
31#endif
32
33#endif /*_SQSTD_STRING_H_*/
34