mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
overload str_mid so it has the same semantics as Python's slice operator
This is an imperfect revision of history.
This commit is contained in:
parent
4a7e2ff093
commit
96e20d891c
2 changed files with 6 additions and 0 deletions
|
@ -15,5 +15,8 @@
|
|||
@extern string (string str) str_free;
|
||||
@extern string (string dst, string src) str_copy;
|
||||
@extern string (string str) str_clear;
|
||||
@extern string (string str, integer start) @overload str_mid;
|
||||
@extern string (string str, integer start, integer len) @overload str_mid;
|
||||
@extern string (string haystack, string needle) str_str;
|
||||
|
||||
#endif//__ruamoko_string_h
|
||||
|
|
|
@ -14,3 +14,6 @@ string (void) str_new = #0;
|
|||
string (string str) str_free = #0;
|
||||
string (string dst, string src) str_copy = #0;
|
||||
string (string str) str_clear = #0;
|
||||
string (string str, integer start) str_mid = #0;
|
||||
string (string str, integer start, integer len) str_mid = #0;
|
||||
string (string haystack, string needle) str_str = #0;
|
||||
|
|
Loading…
Reference in a new issue