str_concat3()

str_concat3()#

Concatenates three strings into a newly allocated buffer and returns the result. The caller must free the returned string using str_concat_free().

Prototype

char *str_concat3(
    const char *str1,
    const char *str2,
    const char *str3
);

Parameters

Key

Type

Description

str1

const char *

First string to concatenate. Can be NULL.

str2

const char *

Second string to concatenate. Can be NULL.

str3

const char *

Third string to concatenate. Can be NULL.


Return Value

A newly allocated string containing the concatenation of str1, str2, and str3. The caller must free the returned string using str_concat_free(). Returns NULL if memory allocation fails.

Notes

If any of the input strings are NULL, they are treated as empty strings.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples