2 * CRTDLL multi-byte string functions
4 * Copyright 1999 Alexandre Julliard
12 /*********************************************************************
13 * CRTDLL__mbsinc (CRTDLL.205)
15 LPSTR __cdecl
CRTDLL__mbsinc( LPCSTR str
)
17 if (IsDBCSLeadByte( *str
)) str
++;
18 return (LPSTR
)(str
+ 1);
22 /*********************************************************************
23 * CRTDLL__mbslen (CRTDLL.206)
25 INT __cdecl
CRTDLL__mbslen( LPCSTR str
)
28 for (len
= 0; *str
; len
++, str
++) if (IsDBCSLeadByte(str
[0]) && str
[1]) str
++;
33 /*********************************************************************
34 * CRTDLL_mbtowc (CRTDLL.430)
36 INT __cdecl
CRTDLL_mbtowc( WCHAR
*dst
, LPCSTR str
, INT n
)
40 if (!MultiByteToWideChar( CP_ACP
, 0, str
, n
, dst
, 1 )) return 0;
41 /* return the number of bytes from src that have been used */
43 if (n
>= 2 && IsDBCSLeadByte(*str
) && str
[1]) return 2;