chrPutc

Put a character string into another at a given position

Description:

The string "str1" (or as much of it as there is room for) is copied into the part of "str2" beginning at position "iposn+1". "iposn" is updated to indicate the end position of the copy of "str1" within "str2" after this operation. If no copying is done, "iposn" is returned unchanged.

Invocation

void chrPutc( const char str1, char str2, size_t str2_length, size_t iposn )

Parameters :

str1
Pointer to a null terminated string holding the string to be copied.
str2
Pointer to a null terminated string holding the string into which "str1" is to be copied.
str2_length
The declared length of the supplied str2 array. This should include room for the terminating null.
iposn
The zero-based position pointer within "str2".