summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorRalph Desir <[email protected]>2015-09-01 13:50:27 -0400
committerRalph Desir <[email protected]>2015-09-01 13:50:27 -0400
commit8ad8c547dda2850e67113f6d5a8c4b4d186fe27f (patch)
treed8983a9a967783c7792d61cf56755c9ef6f64770 /doc
parentd78d0017342ef42cc0d5db517446c805e23ae344 (diff)
downloadmruby-8ad8c547dda2850e67113f6d5a8c4b4d186fe27f.tar.gz
mruby-8ad8c547dda2850e67113f6d5a8c4b4d186fe27f.zip
Update string.h.md
Diffstat (limited to 'doc')
-rw-r--r--doc/api/mruby/string.h.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/api/mruby/string.h.md b/doc/api/mruby/string.h.md
index 428a3ca40..1268792e0 100644
--- a/doc/api/mruby/string.h.md
+++ b/doc/api/mruby/string.h.md
@@ -1,3 +1,7 @@
+## Macros
+### mrb_str_ptr(s)
+Returns a pointer from a Ruby string.
+## Functions
### mrb_str_plus
```C
mrb_value mrb_str_plus(mrb_state*, mrb_value, mrb_value);
@@ -43,3 +47,45 @@ Duplicates a string object.
mrb_value mrb_str_intern(mrb_state *mrb, mrb_value self);
```
Returns a symbol from a passed in string.
+### mrb_str_to_str
+```C
+ mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str);
+```
+Returns a converted string type.
+### mrb_str_equal
+```C
+ mrb_bool mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2);
+```
+Returns true if the strings match and false if the strings don't match.
+### mrb_str_cat
+```C
+ mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len);
+```
+Returns a concated string comprised of a Ruby string and a C string.
+### mrb_str_cat_cstr
+```C
+ mrb_value mrb_str_cat_str(mrb_state *mrb, mrb_value str, mrb_value str2);
+```
+Returns a concated string comprised of a Ruby string and a C string(A shorter alternative to mrb_str_cat).
+### mrb_str_append
+```C
+ mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2);
+```
+Adds str2 to the end of str1.
+### mrb_str_cmp
+```C
+ int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2);
+```
+Returns 0 if both Ruby strings are equal.
+Returns a value < 0 if Ruby str1 is less than Ruby str2.
+Returns a value > 0 if Ruby str2 is greater than Ruby str1.
+### mrb_str_to_cstr
+```C
+ char *mrb_str_to_cstr(mrb_state *mrb, mrb_value str);
+```
+Returns a C string from a Ruby string.
+### mrb_str_inspect
+```C
+ mrb_str_inspect(mrb_state *mrb, mrb_value str);
+```
+Returns a printable version of str, surrounded by quote marks, with special characters escaped.