AnsiLowerBuff

3.0

  UINT AnsiLowerBuff(lpszString, cbString)    
  LPSTR lpszString; /* address of string to convert */
  UINT cbString; /* length of string, */  

The AnsiLowerBuff function converts a character string in a buffer to lowercase.

Parameters

lpszString

Points to a buffer containing one or more characters.

cbString

Specifies the number of bytes in the buffer identified by the lpszString parameter. If cbString is zero, the length is 64K (65,536).

Return Value

The return value specifies the length of the converted string if the function is successful. Otherwise, it is zero.

Comments

The language driver makes the conversion for the current language (the one selected by the user at setup or by using Control Panel). If no language driver has been selected, Windows uses an internal function.

Example

The following example uses the AnsiLowerBuff function to convert two strings to lowercase for a non–case-sensitive comparison:

AnsiLowerBuff(pszSubject, (UINT) lstrlen(pszSubject));
AnsiLowerBuff(pszTarget, (UINT) lstrlen(pszTarget));


while (*pszTarget != '\0') {
    if (*pszTarget != *pszSubject)
        return FALSE;
    pszTarget = AnsiNext(pszTarget);
    pszSubject = AnsiNext(pszSubject);
}

See Also

AnsiLower, AnsiUpper