Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
strxfrm.c File Reference
#include <string.h>
Include dependency graph for strxfrm.c:

Go to the source code of this file.

Functions

size_t strxfrm (char *restrict dest, const char *restrict src, size_t n)
 

Function Documentation

◆ strxfrm()

size_t strxfrm ( char *restrict  dest,
const char *restrict  src,
size_t  n 
)

Definition at line 3 of file strxfrm.c.

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
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

References strcpy(), and strlen().