mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user