carta
wn_strncat(3)

wn_strncat3

String operations

Part of wnstr(3).

Usage

char out [] ,in [] ;

int n;

char out [] ,in [] ;

char out [] ,in [] ;

int n;

char out [] ,s1 [] ,s2 [] ;

char out [] ,s1 [] ,s2 [] ,s3 [] ;

char out [] ,s1 [] ,s2 [] ,s3 [] ,s4 [] ;

char out [] ,s1 [] ,s2 [] ,s3 [] ,s4 [] ,s5 [] ;

char out [] ,s1 [] ,s2 [] ,s3 [] ,s4 [] ,s5 [] ,s6 [] ;

bool wn_char_in_string(c,s)

char c,s [] ;

Overview

These routines operate on null-terminated character strings. They do not check for overflow of any receiving string.

wn_strncpy is NOT the same as "strncpy"; it copies strlen(in) or n chars, whichever is less, and then null terminates. The target can become as long as n+1 chars, including the null-termination.

wn_stracpy allocates (from the current memory group) strlen(in)+1 chars of memory for out, and then copies in to it.

wn_strncat is NOT the same as "strncat"; it appends chars from in while out has strlen < n, and then null terminates. The target can become as long as n+1 chars, including the null-termination.

wn_stracat allocates (from the current memory group) strlen(s1)+strlen(s2)+1 chars of memory for out, then puts the concatonation of s1 and s2 in this memory. wn_stracat3 concatonates 3 strings in the same manner, etc.

wn_char_in_string returns TRUE iff the character c is contained in the null-terminated string s.

Author

Will Naylor

From libwn-dev 6.0-17 in Debian 4.0 (Etch). Parsed by carta from the page's man source.