Implemented StrCatBuff.

This commit is contained in:
Huw D M Davies 2000-06-20 20:17:39 +00:00 committed by Alexandre Julliard
parent 6e99273cf9
commit 11ab5b90cc
2 changed files with 38 additions and 0 deletions

View File

@ -336,6 +336,42 @@ int WINAPI StrCSpnW (LPCWSTR lpStr, LPCWSTR lpSet)
return pos;
}
/*************************************************************************
* StrCatBuffA [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPSTR WINAPI StrCatBuffA(LPSTR front, LPCSTR back, INT size)
{
LPSTR dst = front + lstrlenA(front);
LPCSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/*************************************************************************
* StrCatBuffW [SHLWAPI]
*
* Appends back onto front, stopping when front is size-1 characters long.
* Returns front.
*
*/
LPWSTR WINAPI StrCatBuffW(LPWSTR front, LPCWSTR back, INT size)
{
LPWSTR dst = front + lstrlenW(front);
LPCWSTR src = back, end = front + size - 1;
while(dst < end && *src)
*dst++ = *src++;
*dst = '\0';
return front;
}
/************************* OLESTR functions ****************************/
/************************************************************************

View File

@ -608,6 +608,8 @@ init ShlwapiLibMain
@ stub StrCSpnIA
@ stub StrCSpnIW
@ stdcall StrCSpnW (wstr wstr) StrCSpnW
@ stdcall StrCatBuffA (str str long) StrCatBuffA
@ stdcall StrCatBuffW (wstr wstr long) StrCatBuffW
@ stub StrCatW
@ stdcall StrChrA (str long) StrChrA
@ stub StrChrIA