diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-11 12:29:33 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-11 12:29:33 -0300 |
commit | 0bda0fcb3e8985fe613b696761ab5f211316faf7 (patch) | |
tree | 359747451ac186ecd81a98cbf509945fcd594d0d /core/array.h | |
parent | f5aadad7ae58d2eec06e7b6fff29a9ca2d035063 (diff) | |
parent | 6ce5876c63ffd7bc21b38197c4fa89713a77ceb5 (diff) |
Merge pull request #5148 from vnen/pr-array-find
Add Array.find(what, from) and Array.rfind(what, from)
Diffstat (limited to 'core/array.h')
-rw-r--r-- | core/array.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/array.h b/core/array.h index 9472a6dd21..096660653e 100644 --- a/core/array.h +++ b/core/array.h @@ -71,7 +71,8 @@ public: void sort_custom(Object *p_obj,const StringName& p_function); void invert(); - int find(const Variant& p_value) const; + int find(const Variant& p_value, int p_from=0) const; + int rfind(const Variant& p_value, int p_from=-1) const; int find_last(const Variant& p_value) const; int count(const Variant& p_value) const; |