mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
694ad2e840
This returns the character (as an int) at the index. Equivalent to string[index], but qc code doesn't have char-level access and not having it means that strings can internally change to wchar without too much fuss (maybe).
25 lines
878 B
C
25 lines
878 B
C
#ifndef __ruamoko_string_h
|
|
#define __ruamoko_string_h
|
|
|
|
@extern string ftos (float f);
|
|
@extern string vtos (vector v);
|
|
@extern float stof (string s);
|
|
@extern float strlen (string s);
|
|
@extern float charcount (string goal, string s);
|
|
@extern string sprintf (string fmt, ...);
|
|
@extern string vsprintf (string fmt, @va_list args);
|
|
@extern string itos (int i);
|
|
@extern int stoi (string s);
|
|
@extern vector stov (string s);
|
|
|
|
@extern string str_new (void);
|
|
@extern string str_free (string str);
|
|
@extern string str_copy (string dst, string src);
|
|
@extern string str_cat (string dst, string src);
|
|
@extern string str_clear (string str);
|
|
@extern @overload string str_mid (string str, int start);
|
|
@extern @overload string str_mid (string str, int start, int len);
|
|
@extern string str_str (string haystack, string needle);
|
|
@extern int str_char (string str, int ind);
|
|
|
|
#endif//__ruamoko_string_h
|