2 * CRTDLL multi-byte string functions
4 * Copyright 1999 Alexandre Julliard
13 /*********************************************************************
14 * CRTDLL__mbsinc (CRTDLL.205)
16 LPSTR __cdecl CRTDLL__mbsinc( LPCSTR str )
18 if (IsDBCSLeadByte( *str )) str++;
19 return (LPSTR)(str + 1);
23 /*********************************************************************
24 * CRTDLL__mbslen (CRTDLL.206)
26 INT __cdecl CRTDLL__mbslen( LPCSTR str )
29 for (len = 0; *str; len++, str++) if (IsDBCSLeadByte(str[0]) && str[1]) str++;
34 /*********************************************************************
35 * CRTDLL_mbtowc (CRTDLL.430)
37 INT __cdecl CRTDLL_mbtowc( WCHAR *dst, LPCSTR str, INT n )
41 if (!MultiByteToWideChar( CP_ACP, 0, str, n, dst, 1 )) return 0;
42 /* return the number of bytes from src that have been used */
44 if (n >= 2 && IsDBCSLeadByte(*str) && str[1]) return 2;