MCPcopy Create free account
hub / github.com/F-Stack/f-stack / strncpy0

Function strncpy0

lib/ff_ini_parser.c:65–70  ·  view source on GitHub ↗

Version of strncpy that ensures dest (size bytes) is null-terminated. */

Source from the content-addressed store, hash-verified

63
64/* Version of strncpy that ensures dest (size bytes) is null-terminated. */
65static char* strncpy0(char* dest, const char* src, size_t size)
66{
67 strncpy(dest, src, size - 1);
68 dest[size - 1] = '\0';
69 return dest;
70}
71
72/* See documentation in header file. */
73int ini_parse_stream(ini_reader reader, void* stream, ini_handler handler,

Callers 1

ifFunction · 0.85

Calls 1

strncpyFunction · 0.85

Tested by

no test coverage detected