acl/lib_acl/include/stdlib/acl_stringops.h

60 lines
1.6 KiB
C
Raw Normal View History

#ifndef ACL_STRINGOPS_INCLUDE_H
2014-11-19 00:25:21 +08:00
#define ACL_STRINGOPS_INCLUDE_H
#ifdef __cplusplus
extern "C" {
#endif
#include "acl_define.h"
/**
* <EFBFBD>жϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ȫΪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param str {const char*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {int} 0: <EFBFBD><EFBFBD>; 1: <EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API int acl_alldig(const char *str);
/**
* <EFBFBD>жϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param s {const char*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @return {int} 0: <EFBFBD><EFBFBD>; 1: <EFBFBD><EFBFBD>
*/
ACL_API int acl_is_double(const char *s);
2014-11-19 00:25:21 +08:00
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD>ӳ<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param arg0 {const char*} <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>
* @param ... <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL
* @return {char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> acl_myfree <EFBFBD>ͷ<EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API char *acl_concatenate(const char *arg0,...);
/**
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ȫ·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD> "/tmp/test.txt" <EFBFBD><EFBFBD> "\\tmp\\test.txt" <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD> test.txt
* @param path {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"/tmp/test.txt"
* <EFBFBD><EFBFBD> "\\tmp\\test.txt"
* @return {const char*} <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ͷţ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĵ<EFBFBD>ַ
* Ϊ<EFBFBD>մ<EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>Ϊ '\0') <EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API const char *acl_safe_basename(const char *path);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>зָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ȡ<EFBFBD><EFBFBD> name, value <EFBFBD><EFBFBD>ַ, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ
* {sp}{name}{sp}={sp}{value}{sp}, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>򽫽<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>д,
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> {sp} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ: <EFBFBD>ո<EFBFBD>, "\t", "\r", "\n"
* @param buf {char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>
* @param name {char**} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>
* @param value {char**} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* ʧ<EFBFBD><EFBFBD>ԭ<EFBFBD><EFBFBD>
2014-11-19 00:25:21 +08:00
*/
ACL_API const char *acl_split_nameval(char *buf, char **name, char **value);
#ifdef __cplusplus
}
#endif
#endif