AppleWin/source/linux/windows/strings.cpp
Andrea Odetti 7529f5c659 Reworked the entire wondows.h replacement.
wincompat.h is a stripped down version coming from linapple-pie with the bare minimum common types.
Each group of functions in its own file.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-11-23 18:17:44 +00:00

18 lines
347 B
C++

#include "linux/windows/strings.h"
#include <cstring>
// make all chars in buffer lowercase
DWORD CharLowerBuff(LPTSTR lpsz, DWORD cchLength)
{
for (CHAR * c = lpsz; c != lpsz + cchLength; ++c)
{
*c = tolower(*c);
}
return cchLength;
}
void strcpy_s(char * dest, size_t size, const char * source)
{
strncpy(dest, source, size);
}