XSTRING

Section: Compatibility Functions (3C)
Updated: local
Index Return to Main Contents
 

NAME

strxcat, strxncat, strxcpy, strxncpy, strxmov, strxnmov - string operations with variable number of arguments  

SYNOPSIS

#include <strings.h>

char *strxcat(dst, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;

char *strxncat(dst, len, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;
    int len;

char *strxcpy(dst, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;

char *strxncpy(dst, len, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;
    int len;

char *strxmov(dst, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;

char *strxnmov(dst, len, src1, src2, ..., NullS)
    char *dst, *src1, *src2, ...;
    int len;
 

DESCRIPTION

These functions operate on null-terminated strings. They are equivalent to the corresponding functions strcat(3c), strncat(3c), strmov(3c), strnmov(3c), strcpy(3c), and strncpy(3c), except that they allow more than one source string to be supplied. Strxcat, strxncat, strxcpy, and strxncpy return their first argument (the destination pointer). Strxmov and strxnmov return a pointer to just after the last non-NUL character moved to the destination. This is the same convention that is used throughout the strings package. Except as implied by the length parameter len, they do not check for overflow of any receiving string.

Strxcat appends a copy of the strings src1, src2, and so on, to dst. The resulting string will always be NUL-terminated. Strxncat copies at most len characters. The resulting string will be NUL-terminated if fewer than len characters were moved. At most one NUL is added.

Strxcpy copies the strings src1, src2, and so on, into dst. Strxncpy copies at most len characters. The resulting string will not be null-terminated if len or more characters were in the source strings. By analogy with strncpy, dst will be padded on the right with NUL characters to exactly len bytes.

Apart from their return value, strxmov and strxnmov have the same effect as strxcpy and strxncpy.  

CAVEATS

The placement for the len variable is different from the placement in the functions strncat(3c), strncpy(3c), and strnmov(3c).


 

Index

NAME
SYNOPSIS
DESCRIPTION
CAVEATS

This document was created by man2html, using the manual pages.
Time: 22:33:46 GMT, January 18, 2023