Commit d78d0017 authored by Ralph Desir's avatar Ralph Desir

Update string.h.md

parent 00dd2dfa
...@@ -10,6 +10,36 @@ Adds to strings together. ...@@ -10,6 +10,36 @@ Adds to strings together.
Converts pointer into a Ruby string. Converts pointer into a Ruby string.
### mrb_obj_as_string ### mrb_obj_as_string
```C ```C
mrb_obj_as_string(mrb_state *mrb, mrb_value obj); mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
``` ```
Returns an object as a Ruby string. Returns an object as a Ruby string.
### mrb_str_resize
```C
mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len);
```
Resizes the string's length.
### mrb_str_substr
```C
mrb_value mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len);
```
Returns a sub string.
### mrb_string_type
```C
mrb_value mrb_string_type(mrb_state *mrb, mrb_value str);
```
Returns a Ruby string type.
### mrb_str_new_cstr
```C
const char *mrb_string_value_cstr(mrb_state *mrb, mrb_value *ptr);
```
Returns a Ruby string as a C string.
### mrb_str_dup
```C
mrb_value mrb_str_dup(mrb_state *mrb, mrb_value str);
```
Duplicates a string object.
### mrb_str_intern
```C
mrb_value mrb_str_intern(mrb_state *mrb, mrb_value self);
```
Returns a symbol from a passed in string.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment