1usetat(3) Allegro manual usetat(3)
2
3
4
6 usetat - Replaces a character in a string. Allegro game programming
7 library.
8
10 #include <allegro.h>
11
12
13 int usetat(char *s, int index, int c);
14
16 Replaces the character at the specified index in the string with value
17 `c', handling any adjustments for variable width data (ie. if `c'
18 encodes to a different width than the previous value at that location).
19 If `index' is negative, it counts backward from the end of the string.
20 Example:
21
22 usetat(text_string, 2, letter_a);
23
25 Returns the number of bytes by which the trailing part of the string
26 was moved. This is of interest only with text encoding formats where
27 characters have a variable length, like UTF-8.
28
29
31 uoffset(3), ugetat(3), uinsert(3), uremove(3)
32
33
34
35Allegro version 4.2.3 usetat(3)