0001
0002 #ifndef _PSSTD_STRING_H_
0003 #define _PSSTD_STRING_H_
0004
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008
0009 typedef unsigned int PSRexBool;
0010 typedef struct PSRex PSRex;
0011
0012 typedef struct {
0013 const PSChar *begin;
0014 PSInteger len;
0015 } PSRexMatch;
0016
0017 PSCRIPT_API PSRex *psstd_rex_compile(const PSChar *pattern,const PSChar **error);
0018 PSCRIPT_API void psstd_rex_free(PSRex *exp);
0019 PSCRIPT_API PSBool psstd_rex_match(PSRex* exp,const PSChar* text);
0020 PSCRIPT_API PSBool psstd_rex_search(PSRex* exp,const PSChar* text, const PSChar** out_begin, const PSChar** out_end);
0021 PSCRIPT_API PSBool psstd_rex_searchrange(PSRex* exp,const PSChar* text_begin,const PSChar* text_end,const PSChar** out_begin, const PSChar** out_end);
0022 PSCRIPT_API PSInteger psstd_rex_getsubexpcount(PSRex* exp);
0023 PSCRIPT_API PSBool psstd_rex_getsubexp(PSRex* exp, PSInteger n, PSRexMatch *subexp);
0024
0025 PSCRIPT_API PSRESULT psstd_format(HPSCRIPTVM v,PSInteger nformatstringidx,PSInteger *outlen,PSChar **output);
0026
0027 PSCRIPT_API PSRESULT psstd_register_stringlib(HPSCRIPTVM v);
0028
0029 #ifdef __cplusplus
0030 }
0031 #endif
0032
0033 #endif