Added mrb_str_index to the mrb API

This commit is contained in:
Christopher Aue
2017-07-28 21:07:20 +02:00
parent 4696093673
commit c7018ea962
2 changed files with 27 additions and 12 deletions
+6
View File
@@ -84,6 +84,12 @@ MRB_API mrb_int mrb_str_strlen(mrb_state*, struct RString*);
void mrb_gc_free_str(mrb_state*, struct RString*);
MRB_API void mrb_str_modify(mrb_state*, struct RString*);
/*
* Finds the index of a substring in a string
*/
MRB_API mrb_int mrb_str_index(mrb_state*, mrb_value, const char*, mrb_int, mrb_int);
/*
* Appends self to other. Returns self as a concatnated string.
*