字符串库函数
来源:互联网 发布:南丹县网络问政平台 编辑:程序博客网 时间:2024/05/21 17:53
- char
* __cdecl strstr ( -
const char * str1, -
const char * str2 -
) - {
-
char *cp char= ( *) str1; -
char *s1, *s2; -
-
if ( !*str2 ) -
return((char *)str1); -
-
while (*cp) -
{ -
s1 = cp; -
s2 = (char *) str2; -
-
while ( *s1 && *s2 && !(*s1-*s2) ) -
s1++, s2++; -
-
if (!*s2) -
return(cp); -
-
cp++; -
} -
-
return(NULL); -
- }
[cpp] view plaincopy
- size_t
__cdecl strlen ( -
const char * str -
) - {
-
const char *eos = str; -
-
while( *eos++ ) ; -
-
return( ( int)(eos- str - 1) ); - }
[cpp] view plaincopy
- void
* __cdecl memset ( -
void *dst, -
int val, -
size_t count -
) - {
-
void *start = dst; -
- #if
defined (_M_MRX000) || defined (_M_ALPHA) || defined (_M_PPC) -
{ -
extern void RtlFillMemory( void*, size_tcount, char); -
-
RtlFillMemory( dst, count, (char)val ); -
} - #else
-
while (count--) { -
*(char *)dst char)val;= ( -
dst = (char *)dst + 1; -
} - #endif
-
-
return(start); - }
[cpp] view plaincopy
- void
* __cdecl memcpy ( -
void * dst, -
const void * src, -
size_t count -
) - {
-
void * ret = dst; -
- #if
defined (_M_MRX000) || defined (_M_ALPHA) || defined (_M_PPC) -
{ -
extern void RtlMoveMemory( void*, constvoid *, size_tcount ); -
-
RtlMoveMemory( dst, src, count ); -
} - #else
-
-
while (count--) { -
*(char *)dst char= *( *)src; -
dst = (char *)dst + 1; -
src = (char *)src + 1; -
} - #endif
-
-
return(ret); - }
- 字符串库函数
- 字符串库函数
- 字符串库函数
- 字符串库函数
- 字符串库函数
- 实现字符串查找库函数
- 字符串的库函数
- 不用库函数反转字符串
- 几个字符串库函数
- Lua 字符串库函数总结
- Lua 字符串库函数总结
- 5. 使用字符串库函数
- C字符串处理库函数
- C++ 字符串库函数整理
- 库函数之字符串
- 字符串处理(库函数)
- strtok库函数(分解字符串)
- 字符串库函数实现
- 字符串处理源码
- 常见c函数源码,字符串处理,strcp…
- Strcmp函数源码从VC库文件中提取
- _cdecl
- 创业之殇—-我真的很傻逼
- 字符串库函数
- 不定参数函数
- CUDA和OpenCV配置参考
- 整数二进制比特反转
- 原码和补码之间关系
- cha与unsigned char的区别
- window远程linux
- 终于知道为啥光流法track失败时不l…
- Atmega128串口详解