1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
.TH "al_ustr_set_chr" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_ustr_set_chr \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>
size_t\ al_ustr_set_chr(ALLEGRO_USTR\ *us,\ int\ start_pos,\ int32_t\ c)
\f[]
.fi
.SH DESCRIPTION
.PP
Replace the code point beginning at byte offset \f[C]start_pos\f[] with
\f[C]c\f[].
\f[C]start_pos\f[] cannot be less than 0.
If \f[C]start_pos\f[] is past the end of \f[C]us\f[] then the space
between the end of the string and \f[C]start_pos\f[] will be padded with
NUL (\f[C]\[aq]\\0\[aq]\f[]) bytes.
If \f[C]start_pos\f[] is not the start of a valid code point, that is an
error and the string will be unmodified.
.PP
On success, returns the number of bytes written, i.e.
the offset to the following code point.
On error, returns 0.
.SH SEE ALSO
.PP
al_ustr_replace_range(3)
|