1al_ref_cstr(3)             Library Functions Manual             al_ref_cstr(3)
2
3
4

NAME

6       al_ref_cstr
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              ALLEGRO_USTR *al_ref_cstr(ALLEGRO_USTR_INFO *info, const char *s)
12

DESCRIPTION

14       Create  a  string that references the storage of a C-style string.  The
15       information about the string (e.g.  its size) is stored in  the  struc‐
16       ture  pointed  to  by the info parameter.  The string will not have any
17       other storage allocated of its own, so if you allocate the info  struc‐
18       ture on the stack then no explicit “free” operation is required.
19
20       The string is valid until the underlying C string disappears.
21
22       Example:
23
24              ALLEGRO_USTR_INFO info;
25              ALLEGRO_USTR us = al_ref_cstr(&info, "my string");
26

SEE ALSO

28       al_ref_buffer(3), al_ref_ustr(3)
29
30
31
32Allegro reference manual                                        al_ref_cstr(3)
Impressum