diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-29 07:05:37 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-07-29 07:05:37 +0900 |
| commit | b290e98f3b4e8623fd8932c9996d0481f56f766b (patch) | |
| tree | 4b875e10e0037d14846999130e4f587bb23d4163 /include | |
| parent | cf23a85333c9c0ee83b0dca4c40d0d33beaf7f66 (diff) | |
| parent | f937af5745cbc6edead0ad3911bf16e08f66a96f (diff) | |
| download | mruby-b290e98f3b4e8623fd8932c9996d0481f56f766b.tar.gz mruby-b290e98f3b4e8623fd8932c9996d0481f56f766b.zip | |
Merge pull request #3757 from christopheraue/module_const_get_class_path
Extended Module#const_get to support class paths
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h index b18093218..c3fbb063d 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -84,6 +84,13 @@ 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); +#define mrb_str_index_lit(mrb, str, lit, off) mrb_str_index(mrb, str, lit, mrb_strlen_lit(lit), off); + /* * Appends self to other. Returns self as a concatnated string. * |
