MDGSF Software Engineer

[C/C++] strlen 库函数实现

2016-03-11
 

int
strlen(const char *pcStr)
{
    assert(pcStr != NULL);
    int iLen = 0;
    while (*pcStr++ != '\0')
    {
        iLen++;
    }
    return iLen;
}

weixingongzhonghao

Similar Posts

Comments