Skip to content

StrPrintf

StrPrintf

Description

Init the string using the given format string and arguments. Current contents of string will be cleared out

Parameters

Name Direction Description
str in,out Str to be inited with format string.
fmt in Format string, with variadic arguments following.

Success

str

Failure

NULL

Usage example (Cross-references)

Usage examples (Cross-references)
                if (*offset + 4 <= size) {
                    int value = (int)extract_u32(data, offset, size);
                    StrPrintf(str, "Value: %d", value);
                }
                break;
    static Str *string_va_printf(Str *str, const char *fmt, va_list args);
    
    Str *StrPrintf(Str *str, const char *fmt, ...) {
        ValidateStr(str);
Last updated on