lstrlen

 

Description

The lstrlen (alias strlen) function returns the length of a string in bytes.

Syntax

int lstrlen( LPCSTR lpString )

Parameters

lpString
[input]Pointer to a null-terminated string.

Return

the length of the string (not including zero termination).

Examples

EX1

void lstrlen_ex1()
{
    string        str1 = "Hello World!";    
    int            len = lstrlen(str1);    // len is 12 (the length of str1).
    out_int("The length is ", len);
}

Remark

See Also

strlen

header to Include

origin.h

Reference