MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / strncopy

Function strncopy

extensions/pgsql/pgsql/PgDriver.cpp:243–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243unsigned int strncopy(char *dest, const char *src, size_t count)
244{
245 if (!count)
246 {
247 return 0;
248 }
249
250 char *start = dest;
251 while ((*src) && (--count))
252 {
253 *dest++ = *src++;
254 }
255 *dest = '\0';
256
257 return (dest - start);
258}

Callers 2

CopyStringMethod · 0.70
PrepareQueryMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected