Skip to content
Snippets Groups Projects
Commit 11ab5b90 authored by Huw D. M. Davies's avatar Huw D. M. Davies Committed by Alexandre Julliard
Browse files

Implemented StrCatBuff.

parent 6e99273c
No related branches found
No related tags found
No related merge requests found
......@@ -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 ****************************/
/************************************************************************
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment