词条 | kal_wstrcpy |
释义 | MTK中的字符串拷贝函数,宽字节,主要用于unicode编码格式的字串拷贝,用法和strcpy相同,MTK中的kal_wstrcmp、kal_wstrcat等函数也是这样 文件:kal_release.h typedef unsigned short WCHAR; // 16bits string operationsint kal_wstrlen(const WCHAR *wstr); WCHAR *kal_wstrcpy(WCHAR *to, const WCHAR *from); WCHAR *kal_wstrncpy(WCHAR *to, const WCHAR *from, int n); int kal_wstrcmp(const WCHAR *s1, const WCHAR *s2); int kal_wstrncmp(const WCHAR *s1, const WCHAR *s2, int n); WCHAR *kal_wstrcat(WCHAR *s1, const WCHAR *s2); WCHAR *kal_wstrncat(WCHAR *s1, const WCHAR *s2, int n); WCHAR *kal_wstrchr(const WCHAR *s, int c); WCHAR *kal_wstrrchr(const WCHAR *str, int ch); // dual 8bits string operationsint kal_dchar_strlen(const char *wstr); char *kal_dchar_strcpy(char *to, const char *from); char *kal_dchar_strncpy(char *to, const char *from, int n); int kal_dchar_strcmp(const char *s1, const char *s2); int kal_dchar_strncmp(const char *s1, const char *s2, int n); char *kal_dchar_strcat(char *s1, const char *s2); char *kal_dchar_strncat(char *s1, const char *s2, int n); char *kal_dchar_strchr(const char *s, int c); char *kal_dchar_strrchr(const char *str, int ch); void kal_dchar2char(WCHAR *outstr, char* tostr); void kal_wsprintf(WCHAR *outstr, char *fmt,...); #define kal_toWCHAR(asciiString) L##asciiString 在MTK平台进行宽字符串的处理,可以用这些KAL层(Kernel Abstraction Layer, 适配层)封转的处理函数,更为重要的是,KAL封装了一系列API,这些API为其他软件提供服务,例如队列、消息、timer、内存管理等,通过适配层的封装,增强了程序移植性、测试和调试的功能,并使代码更容易集成。 |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。