Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
strxfrm.c
Go to the documentation of this file.
1 #include <string.h>
2 
3 size_t strxfrm(char* restrict dest, const char* restrict src, size_t n)
4 {
5  size_t l = strlen(src);
6  if(n > l)
7  {
8  strcpy(dest, src);
9  }
10 
11  return l;
12 }
size_t strlen(const char *str)
Returns the length of the given null-terminated byte string.
Definition: strlen.c:77
size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
Definition: strxfrm.c:3
char * strcpy(char *__restrict dst, const char *__restrict src)
Copies the null-terminated byte string pointed to by src to the character array whose first element i...
Definition: strcpy.c:26