MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / strncat

Function strncat

rEFIt_UEFI/Platform/Posix/string.cpp:6–20  ·  view source on GitHub ↗

Function to implement strncat() function in C

Source from the content-addressed store, hash-verified

4
5// Function to implement strncat() function in C
6char* strncat(char* destination, const char* source, size_t num)
7{
8 // make ptr point to the end of destination string
9 char* ptr = destination + strlen(destination);
10
11 // Appends characters of source to the destination string
12 while (*source != '\0' && num--)
13 *ptr++ = *source++;
14
15 // null terminate destination string
16 *ptr = '\0';
17
18 // destination string is returned by standard strncat()
19 return destination;
20}
21
22
23#ifndef strcmp

Callers 6

XStringAbstractClass · 0.85
LongFilePathFunction · 0.85
PrintMessageFunction · 0.85
class_defFunction · 0.85
loadSystemConfigFunction · 0.85

Calls 1

strlenFunction · 0.70

Tested by 1