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

Function strncopy

extensions/sqlite/driver/SqDriver.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38SqDriver g_SqDriver;
39
40unsigned int strncopy(char *dest, const char *src, size_t count)
41{
42 if (!count)
43 {
44 return 0;
45 }
46
47 char *start = dest;
48 while ((*src) && (--count))
49 {
50 *dest++ = *src++;
51 }
52 *dest = '\0';
53
54 return (dest - start);
55}
56
57int busy_handler(void *unused1, int unused2)
58{

Callers 4

CopyStringMethod · 0.70
PrepareQueryMethod · 0.70
PrepareQueryExMethod · 0.70
ConnectMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected