lstrlen

The lstrlen function returns the length in bytes (ANSI version) or characters (Unicode version) of the specified string (not including the terminating null character).

int lstrlen(
  LPCTSTR lpString   // pointer to string to count
);
 

Parameters

lpString
Pointer to a null-terminated string.

Return Values

The return value specifies the length of the string in bytes (ANSI version) or characters (Unicode version).

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: Use kernel32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows and Windows NT.

See Also

String Manipulation Overview, String Manipulation Functions, lstrcat, lstrcmp, lstrcmpi, lstrcpy