Thursday, August 05, 2010

my_strlen

unsigned int my_strlen(const char *szString)
{
unsigned int iBytes = 0;
while(*szString++ != '\0')
iBytes++;
return iBytes;
}

參考來源:

"unsigned int my_strlen(const char *szString) { unsigned int iBytes = 0; while(*szString++ != '\0') iBytes++; return iBytes; }"
- Explanation on strlen(buffer) (在「Google 網頁註解」中檢視)

No comments: