1al_ustr_newf(3)                                                al_ustr_newf(3)
2
3
4

NAME

6       al_ustr_newf - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              ALLEGRO_USTR *al_ustr_newf(const char *fmt, ...)
12

DESCRIPTION

14       Create a new string using a printf-style format string.
15
16       Notes:
17
18       The "%s" specifier takes C string arguments, not ALLEGRO_USTRs.  There‐
19       fore to pass an ALLEGRO_USTR as a parameter you  must  use  al_cstr(3),
20       and  it must be NUL terminated.  If the string contains an embedded NUL
21       byte everything from that byte onwards will be ignored.
22
23       The "%c" specifier outputs a single byte, not the UTF-8 encoding  of  a
24       code point.  Therefore it is only usable for ASCII characters (value <=
25       127) or if you really mean to output byte values from 128--255.  To in‐
26       sert the UTF-8 encoding of a code point, encode it into a memory buffer
27       using al_utf8_encode(3) then use the "%s" specifier.  Remember  to  NUL
28       terminate the buffer.
29

SEE ALSO

31       al_ustr_new(3), al_ustr_appendf(3)
32
33
34
35Allegro reference manual                                       al_ustr_newf(3)
Impressum