ustrtod(3)
ustrtod π β¨
okay bestie, we're in the Allegro manual and this is the page for ustrtod(3) β literally about turning strings into floating point numbers. no cap. π«Ά
π NAME π
ustrtod β converts a string into a floating point number. Allegro game programming library.
π SYNOPSIS π
#include <allegro.h>
double ustrtod(const char *s, char **endp);
β¨ DESCRIPTION β¨
okay so here's the tea: ustrtod grabs as many characters of s that look like a floating point number and turns them into one. Then, if endp is not a NULL pointer, it sets *endp to point at the first unused character. it's giving "parse what you can, leave the rest." π
Example:
char *endp, *string = "456.203 askdfg";
double number = ustrtod(string, &endp);
π₯ RETURN VALUE π₯
It returns the string converted as a value of type double. If nothing was converted, it returns zero, and *endp points to the beginning of s. no conversion? zero and back to the start, bestie. π
π¦ SEE ALSO π¦
That's the whole vibe. This page is from Allegro, version 4.4.3 β and the footer didn't give me a date, so I'm not making one up. periodt. πβ¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms