1al_ref_ustr(3) Library Functions Manual al_ref_ustr(3)
2
3
4
6 al_ref_ustr
7
9 #include <allegro5/allegro.h>
10
11 ALLEGRO_USTR *al_ref_ustr(ALLEGRO_USTR_INFO *info, const ALLEGRO_USTR *us,
12 int start_pos, int end_pos)
13
15 Create a read-only string that references the storage of another
16 string. The information about the string (e.g. its size) is stored in
17 the structure pointed to by the info parameter. The string will not
18 have any other storage allocated of its own, so if you allocate the
19 info structure on the stack then no explicit “free” operation is
20 required.
21
22 The referenced interval is [start_pos, end_pos).
23
24 The string is valid until the underlying string is modified or
25 destroyed.
26
27 If you need a range of code-points instead of bytes, use al_ustr_off‐
28 set(3) to find the byte offsets.
29
31 al_ref_cstr(3), al_ref_buffer(3)
32
33
34
35Allegro reference manual al_ref_ustr(3)