Sprintf matlab

broken image

The buffer should be large enough to contain the resulting string. Parameters str Pointer to a buffer where the resulting C-string is stored.

broken image

The size of the buffer should be large enough to contain the entire resulting string (see snprintf for a safer version).Ī terminating null character is automatically appended after the content.Īfter the format parameter, the function expects at least as many additional arguments as needed for format. Composes a string with the same text that would be printed if format was used on printf, but instead of being printed, the content is stored as a C string in the buffer pointed by str.