MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / Strlcpy

Function Strlcpy

common/StringUtil.cpp:150–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 std::size_t Strlcpy(char* dst, const char* src, std::size_t size)
151 {
152 std::size_t len = std::strlen(src);
153 if (len < size)
154 {
155 std::memcpy(dst, src, len + 1);
156 }
157 else
158 {
159 std::memcpy(dst, src, size - 1);
160 dst[size - 1] = '\0';
161 }
162 return len;
163 }
164
165 std::size_t Strlcpy(char* dst, const std::string_view src, std::size_t size)
166 {

Callers 14

FreezeTagMethod · 0.85
FreezeBiosMethod · 0.85
SaveState_AddToZipFunction · 0.85
CheckVersionFunction · 0.85
readMethod · 0.85
InitializeMethod · 0.85
createLinesMethod · 0.85
GetAdapterMACMethod · 0.85
AddFolderMethod · 0.85
AddFileMethod · 0.85

Calls 2

lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected