blob: a769d535dc9b35eba7ece597f54412baf02f07d6 [file] [log] [blame]
xiaohu.huangbf62d7b2023-07-18 18:02:43 +08001/*
2 * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#include <string.h>
8#include "aml_strncat.h"
9
10char *strncat(char *dest, const char *src, size_t n)
11{
12 char *ret = dest;
13
14 dest += strlen(dest);
15 for (; n > 0 && *src != '\0' ; n--)
16 *dest++ = *src++;
17
18 *dest = '\0';
19
20 return ret;
21}