summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorChristopher Aue <[email protected]>2017-07-28 21:07:20 +0200
committerChristopher Aue <[email protected]>2017-07-28 21:07:20 +0200
commitc7018ea9627efd9c6fe4ef6b6f459fefef01fc52 (patch)
treec419b9be477edd184c2128be6282b02ee05f2858 /include
parent4696093673c3352a1897490ecc5e4e4e40f463b5 (diff)
downloadmruby-c7018ea9627efd9c6fe4ef6b6f459fefef01fc52.tar.gz
mruby-c7018ea9627efd9c6fe4ef6b6f459fefef01fc52.zip
Added mrb_str_index to the mrb API
Diffstat (limited to 'include')
-rw-r--r--include/mruby/string.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h
index b18093218..8b75a2275 100644
--- a/include/mruby/string.h
+++ b/include/mruby/string.h
@@ -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.
*