diff --git a/docs/api/headers/mruby_2Fstring.h.html b/docs/api/headers/mruby_2Fstring.h.html index 15fefa2..357537a 100644 --- a/docs/api/headers/mruby_2Fstring.h.html +++ b/docs/api/headers/mruby_2Fstring.h.html @@ -129,7 +129,8 @@
Appends self to other.
+Returns the length of the Ruby string.
+Returns a symbol from a passed in string.
+Returns a symbol from a passed in Ruby string.
Appends self to other. Returns self as a concatnated string.
-Example:
- -int
+main(int argc,
+ char **argv)
+{
+ // Variable declarations.
+ mrb_value str1;
+ mrb_value str2;
-
-
Adds two strings together.
+ mrb_state *mrb = mrb_open(); + if (!mrb) + { + // handle error + } + // Creates new Ruby strings. + str1 = mrb_str_new_cstr(mrb, "abc"); + str2 = mrb_str_new_cstr(mrb, "def"); -}
- -Result:
- - -Converts pointer into a Ruby string.
+=> "abcdef"
+
Parameters:
+The current mruby state.
String to concatenate.
String to append to self.
+Returns an object as a Ruby string.
- + -Returns:
+Returns a new String appending other to self.
Resizes the string's length.
+Adds two strings together.
+Example:
-int
+main(int argc,
+ char **argv)
+{
+ // Variable declarations.
+ mrb_value a;
+ mrb_value b;
+ mrb_value c;
-
Returns a sub string.
+ // Prints new Concatnated Ruby string. + mrb_p(mrb, c); + + mrb_close(mrb); + return 0; + + +}
+ +Result:
+ +=> "abc" # First string
+=> "def" # Second string
+=> "abcdef" # First & Second concatnated.
+
Parameters:
+The current mruby state.
+First string to concatenate.
+Second string to concatenate.
+Returns:
+Returns a new String containing a concatenated to b.
+Returns a Ruby string type.
+Converts pointer into a Ruby string.
Parameters:
+The current mruby state.
The pointer to convert to Ruby string.
Returns:
+Returns a new Ruby String.
Returns an object as a Ruby string.
+ + +Resizes the string's length. Returns the amount of characters +in the specified by len.
+ +Example:
+ +int
+main(int argc,
+ char **argv)
+{
+ // Variable declaration.
+ mrb_value str;
+
+ mrb_state *mrb = mrb_open();
+ if (!mrb)
+ {
+ // handle error
+ }
+ // Creates a new string.
+ str = mrb_str_new_cstr(mrb, "Hello, world!");
+ // Returns 5 characters of
+ mrb_str_resize(mrb, str, 5);
+ mrb_p(mrb, str);
+
+ mrb_close(mrb);
+ return 0;
+ }
+
+
+Result:
+ +=> "Hello"
+
+
+
+ Parameters:
+The current mruby state.
+The Ruby string to resize.
+The length.
+Returns:
+An object as a Ruby string.
+Returns a sub string.
+ +Example:
+ +int
+main(int argc,
+char const **argv)
+{
+ // Variable declarations.
+ mrb_value str1;
+ mrb_value str2;
+
+ mrb_state *mrb = mrb_open();
+ if (!mrb)
+ {
+ // handle error
+ }
+ // Creates new string.
+ str1 = mrb_str_new_cstr(mrb, "Hello, world!");
+ // Returns a sub-string within the range of 0..2
+ str2 = mrb_str_substr(mrb, str1, 0, 2);
+
+ // Prints sub-string.
+ mrb_p(mrb, str2);
+
+ mrb_close(mrb);
+ return 0;
+}
+
+
+Result:
+ +=> "He"
+
+
+
+ Parameters:
+The current mruby state.
+Ruby string.
+The beginning point of the sub-string.
+The end point of the sub-string.
+Returns:
+An object as a Ruby sub-string.
+Returns a Ruby string type.
+ + +Returns the length of the Ruby string.
+ + +Duplicates a string object.
-Parameters:
+The current mruby state.
+Ruby string.
+Returns:
+Duplicated Ruby string.
Returns a symbol from a passed in string.
+Returns a symbol from a passed in Ruby string.
Parameters:
+The current mruby state.
+Ruby string.
+Returns:
+A symbol.
+Parameters:
+The current mruby state.
+Ruby string to compare.
+Ruby string to compare.
+Returns:
+boolean value.
+Parameters:
+The current mruby state.
+Ruby string.
+A C string.
+length of C string.
+Returns:
+A Ruby string.
+See Also:
Parameters:
+The current mruby state.
+Ruby string.
+A C string.
+Returns:
+A Ruby string.
+See Also: