quakeforge/ruamoko/lib/string.r
Bill Currie 582423a019 [ruamoko] Extend the string api
Wrap the strtod, strtof, strtol, strtoul functions, supporting the end
pointer as well (if not nil, the int offset of the end pointer relative
to the string start is returned).

Also, str_unmutable creates a return string from a mutable string
(copying it).
2023-05-27 12:47:33 +09:00

25 lines
947 B
R

#include <string.h>
int (string s) strlen = #0;
string (string fmt, ...) sprintf = #0;
string vsprintf (string fmt, @va_list args) = #0;
string (void) str_new = #0;
string str_unmutable (string str) = #0;
void (string str) str_free = #0;
string str_hold (string str) = #0;
int str_valid (string str) = #0;
int str_mutable (string str) = #0;
string (string dst, string src) str_copy = #0;
string (string dst, string src) str_cat = #0;
string (string str) str_clear = #0;
string (string str, int start) str_mid = #0;
string (string str, int start, int len) str_mid = #0;
int str_str (string haystack, string needle) = #0;
int str_char (string str, int ind) = #0;
string str_quote (string str) = #0;
string str_lower (string str) = #0;
string str_upper (string str) = #0;
double strtod (string str, int *end) = #0;
float strtof (string str, int *end) = #0;
long strtol (string str, int *end) = #0;
unsigned long strtoul (string str, int *end) = #0;