shlwapi: Implement IsCharSpaceA().

This commit is contained in:
Nikolay Sivov 2012-12-20 08:43:27 +04:00 committed by Alexandre Julliard
parent 83e87a3232
commit 16cc2b8753
4 changed files with 30 additions and 19 deletions

View File

@ -637,25 +637,6 @@ INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
return iLen;
}
/*************************************************************************
* @ [SHLWAPI.29]
*
* Determine if a Unicode character is a space.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is a space,
* FALSE otherwise.
*/
BOOL WINAPI IsCharSpaceW(WCHAR wc)
{
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE);
}
/*************************************************************************
* @ [SHLWAPI.30]
*

View File

@ -566,6 +566,7 @@
@ stdcall HashData (ptr long ptr long)
@ stdcall IntlStrEqWorkerA(long str str long) StrIsIntlEqualA
@ stdcall IntlStrEqWorkerW(long wstr wstr long) StrIsIntlEqualW
@ stdcall IsCharSpaceA(long)
@ stdcall PathAddBackslashA (str)
@ stdcall PathAddBackslashW (wstr)
@ stdcall PathAddExtensionA (str str)

View File

@ -2824,3 +2824,28 @@ end:
HeapFree(GetProcessHeap(), 0, dllname);
return hr;
}
BOOL WINAPI IsCharSpaceA(CHAR c)
{
WORD CharType;
return GetStringTypeA(GetSystemDefaultLCID(), CT_CTYPE1, &c, 1, &CharType) && (CharType & C1_SPACE);
}
/*************************************************************************
* @ [SHLWAPI.29]
*
* Determine if a Unicode character is a space.
*
* PARAMS
* wc [I] Character to check.
*
* RETURNS
* TRUE, if wc is a space,
* FALSE otherwise.
*/
BOOL WINAPI IsCharSpaceW(WCHAR wc)
{
WORD CharType;
return GetStringTypeW(CT_CTYPE1, &wc, 1, &CharType) && (CharType & C1_SPACE);
}

View File

@ -935,6 +935,10 @@ HRESULT WINAPI StrRetToBufW(STRRET*,LPCITEMIDLIST,LPWSTR,UINT);
HRESULT WINAPI StrRetToBSTR(STRRET*,LPCITEMIDLIST,BSTR*);
BOOL WINAPI IsCharSpaceA(CHAR);
BOOL WINAPI IsCharSpaceW(WCHAR);
#define IsCharSpace WINELIB_NAME_AW(IsCharSpace)
#endif /* NO_SHLWAPI_STRFCNS */