MCPcopy Create free account
hub / github.com/ZDoom/Raze / StringCopy

Function StringCopy

libraries/discordrpc/src/serialization.h:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24// if only there was a standard library function for this
25template <size_t Len>
26inline size_t StringCopy(char (&dest)[Len], const char* src)
27{
28 if (!src || !Len) {
29 return 0;
30 }
31 size_t copied;
32 char* out = dest;
33 for (copied = 1; *src && copied < Len; ++copied) {
34 *out++ = *src++;
35 }
36 *out = 0;
37 return copied - 1;
38}
39
40size_t JsonWriteHandshakeObj(char* dest, size_t maxLen, int version, const char* applicationId);
41

Callers 4

CreateMethod · 0.85
ReadMethod · 0.85
Discord_UpdateConnectionFunction · 0.85
Discord_InitializeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected