1 #ifndef ACL_MYSTRING_INCLUDE_H 2 #define ACL_MYSTRING_INCLUDE_H 18 #ifndef ACL_SAFE_STRNCPY 19 #define ACL_SAFE_STRNCPY(_obj, _src, _size) do { \ 21 size_t _n = strlen(_src); \ 22 _n = _n > (size_t ) _size - 1? (size_t) _size - 1 : _n; \ 23 memcpy(_obj, _src, _n); \ 51 ACL_API
char *
acl_lowercase3(
const char *s,
char *buf,
size_t size);
75 ACL_API
char *
acl_uppercase3(
const char *s,
char *buf,
size_t size);
91 ACL_API
char *
acl_strtok(
char **src,
const char *sep);
92 #define acl_mystrtok acl_strtok 101 #define acl_mystrline acl_strline 109 #define acl_mystr_trim acl_strtrim 119 ACL_API
int acl_strstrip(
const char *haystack,
const char *needle,
120 char *buf,
int bsize);
121 #define acl_mystr_strip acl_strstrip 129 #define acl_mystr_truncate_byln acl_strtrunc_byln 149 ACL_API
int acl_strrncmp(
const char *s1,
const char *s2,
size_t n);
157 ACL_API
char *
acl_rstrstr(
const char *haystack,
const char *needle);
165 ACL_API
char *
acl_strcasestr(
const char *haystack,
const char *needle);
173 ACL_API
char *
acl_rstrcasestr(
const char *haystack,
const char *needle);
182 ACL_API
size_t acl_strnlen(
const char * s,
size_t count);
203 #if defined(_WIN32) || defined(_WIN64) 205 # define strcasestr acl_strcasestr 208 # define strcasecmp acl_strcasecmp 211 # define strncasecmp acl_strncasecmp 216 # define strrncasecmp acl_strrncasecmp 219 # define strrncmp acl_strrncmp 231 char *pbuf,
int sizeb);
243 ACL_API
int acl_dir_correct(
const char *psrc_dir,
char *pbuf,
int sizeb);
252 ACL_API
int acl_dir_getpath(
const char *pathname,
char *pbuf,
int bsize);
259 ACL_API
long long acl_atoll(
const char *s);
273 ACL_API acl_int64
acl_atoi64(
const char *str);
282 ACL_API
const char *
acl_ui64toa(acl_uint64 value,
char *buf,
size_t size);
291 ACL_API
const char *
acl_i64toa(acl_int64 value,
char *buf,
size_t size);
302 size_t size,
int radix);
313 size_t size,
int radix);
ACL_API char * acl_lowercase3(const char *s, char *buf, size_t size)
ACL_API int acl_file_path_correct(const char *psrc_file_path, char *pbuf, int sizeb)
ACL_API int acl_strstrip(const char *haystack, const char *needle, char *buf, int bsize)
ACL_API int acl_strcasecmp(const char *s1, const char *s2)
ACL_API int acl_strtrunc_byln(char *str)
ACL_API acl_uint64 acl_atoui64(const char *str)
ACL_API char * acl_strline(char **src)
ACL_API int acl_dir_correct(const char *psrc_dir, char *pbuf, int sizeb)
ACL_API char * acl_lowercase(char *s)
ACL_API const char * acl_ui64toa(acl_uint64 value, char *buf, size_t size)
ACL_API void acl_line_state_free(ACL_LINE_STATE *state)
ACL_API int acl_strncasecmp(const char *s1, const char *s2, size_t n)
ACL_API ACL_LINE_STATE * acl_line_state_alloc(void)
ACL_API ACL_LINE_STATE * acl_line_state_reset(ACL_LINE_STATE *state, int offset)
ACL_API const char * acl_ui64toa_radix(acl_uint64 value, char *buf, size_t size, int radix)
ACL_API long long acl_atoll(const char *s)
ACL_API const char * acl_i64toa_radix(acl_int64 value, char *buf, size_t size, int radix)
ACL_API char * acl_rstrcasestr(const char *haystack, const char *needle)
ACL_API char * acl_lowercase2(char *s, size_t n)
ACL_API char * acl_uppercase3(const char *s, char *buf, size_t size)
ACL_API int acl_dir_getpath(const char *pathname, char *pbuf, int bsize)
struct ACL_LINE_STATE ACL_LINE_STATE
ACL_API char * acl_strcasestr(const char *haystack, const char *needle)
ACL_API char * acl_uppercase2(char *s, size_t n)
ACL_API size_t acl_strnlen(const char *s, size_t count)
ACL_API int acl_find_blank_line(const char *s, int n, ACL_LINE_STATE *state)
ACL_API char * acl_strtrim(char *str)
ACL_API char * acl_strtok(char **src, const char *sep)
ACL_API acl_int64 acl_atoi64(const char *str)
ACL_API int acl_strrncasecmp(const char *s1, const char *s2, size_t n)
ACL_API int acl_strrncmp(const char *s1, const char *s2, size_t n)
ACL_API const char * acl_i64toa(acl_int64 value, char *buf, size_t size)
ACL_API char * acl_uppercase(char *s)
ACL_API char * acl_rstrstr(const char *haystack, const char *needle)