Updated headers

- Add a bunch of array-related procs to unlock basic functional programming
- Fix error with FUNC_SELECTOR_7
This commit is contained in:
phobos2077
2023-07-05 02:31:47 +02:00
parent f968dea5e7
commit 66559812bd
3 changed files with 68 additions and 15 deletions
+16 -1
View File
@@ -129,10 +129,25 @@ procedure string_split_ints(variable str, variable split) begin
return result;
end
// atoi proc wrapper, for use as callback
procedure string_to_int(variable str) begin
return atoi(str);
end
// atof proc wrapper, for use as callback
procedure string_to_float(variable str) begin
return atof(str);
end
// converts any value to a string, for use as callback
procedure to_string(variable val) begin
return ""+val;
end
/**
DEPRECATED, use string_format instead!
String parse functions. Idea taken from KLIMaka on TeamX forums.
Placeholders in format %d% are replaced from string. d refers to variable index (starting from 1).
You can repeat one placeholder multiple times, or use placeholders in any order.