usetat(3alleg4)
π NAME π
usetat(3alleg4) β bestie, this one replaces a character in a string, and it's from the Allegro game programming library. iconic behavior, no cap β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
int usetat(char *s, int index, int c);
π DESCRIPTION π
Okay so here's the tea: usetat replaces the character at the specified index in the string with value c. And because variable width data is extra like that, it handles any adjustments for it β ie. if c encodes to a different width than the previous value at that location, it deals with that too. flex, honestly π
If index is negative, it counts backward from the end of the string. walking backwards through the string like a true main character πΆββοΈβ¨
Example, bestie:
usetat(text_string, 2, letter_a);
π« RETURN VALUE π«
It returns the number of bytes by which the trailing part of the string was moved. byte movement math, but make it fashion π
This is of interest only with text encoding formats where characters have a variable length, like UTF-8. So if you're living that UTF-8 life, this is your moment ππ₯
π¦ SEE ALSO π¦
Allegro, version 4.4.3, and this whole page is the usetat(3alleg4) manual β slay, read, and go replace some characters responsibly ππβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms