1al_ref_cstr(3)                                                  al_ref_cstr(3)
2
3
4

NAME

6       al_ref_cstr - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              const 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 structure
16       pointed  to  by the info parameter.  The string will not have any other
17       storage allocated of its own, so if you allocate the info structure  on
18       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