al_ref_buffer

ALLEGRO_USTR *al_ref_buffer(ALLEGRO_USTR_INFO *info, const char *s, size_t size)
Introduced in 5.0.0

Like al_ref_cstr but the size of the string data is passed in as a parameter. Hence you can use it to reference only part of a string or an arbitrary region of memory.

The string is valid while the underlying C string is valid.

See also: al_ref_cstr, al_ref_ustr

Examples: ex_utf8


Most helpful discussions: