Commit Graph

266 Commits

Author SHA1 Message Date
Tomoyuki Sahara c4f5c2473a mrb_str_bytesize is a carbon copy of mrb_str_size. remove it.
mruby core does not support any character encodings but ASCII.
2014-08-11 17:46:40 +09:00
kkkkkt 513be0052e changed mrb_str_size and mrb_str_bytesize comments. 2014-08-11 12:02:31 +09:00
Tomoyuki Sahara 412b9eb827 revert accidental constify. 2014-08-05 15:02:27 +09:00
cremno 7dabb33cf0 change linkage of mrb_str_size to internal
Use RSTRING_LEN to get the length.
2014-08-04 01:14:23 +02:00
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
Tatsuhiko Kubo 5b5313ec97 use C style comments instead of C++ style comments 2014-07-13 00:24:45 +09:00
cremno 881f054cbf remove unused mrb_str_body 2014-07-09 11:56:29 +02:00
Yukihiro "Matz" Matsumoto 8459b39886 update String#slice doc 2014-06-18 15:56:34 +09:00
Jun Hiroe eab4a7492f Unsupported Regex in mrb_str_aref_m() 2014-06-15 21:21:20 +09:00
Yukihiro "Matz" Matsumoto be3e36cb05 Merge pull request #2389 from ksss/str-mem-leaks
Fix memory leaks in String
2014-06-12 07:36:36 +09:00
ksss bd53818999 str_replace: self should not be shared and nofree 2014-06-11 14:42:18 +00:00
Jun Hiroe 75d1412410 Refactor how to use RSTR_NOFREE_P macro 2014-06-11 23:10:41 +09:00
Jun Hiroe 9c259c501a Add NOFREE macros 2014-06-11 01:00:35 +09:00
take_cheeze 64994a1764 Check RSTRING_EMBED_LEN_MAX with static assert. 2014-06-08 23:16:55 +09:00
Yukihiro "Matz" Matsumoto 6459a98448 move String#clear to mruby-string-ext; ref #2370 2014-06-07 22:28:42 +09:00
Yukihiro "Matz" Matsumoto 32e450166f move STR_* macros to mruby/string.h with renaming 2014-06-07 22:16:16 +09:00
Yukihiro "Matz" Matsumoto b0c90141d9 clear shared and nofree flags; ref #2370 2014-06-07 17:24:18 +09:00
Yukihiro "Matz" Matsumoto 20dc629b11 inline str_discard(); ref #2370 2014-06-07 16:51:40 +09:00
Jun Hiroe 9709fe79a3 Implement String#clear 2014-06-07 16:15:32 +09:00
cremno f9f864d4dd don't (re-)define ascii_isspace and isascii
`ISSPACE` and `ISASCII` can be used instead.
2014-06-05 20:27:17 +02:00
Yukihiro "Matz" Matsumoto b1dd57efa1 move IS_EVSTR macro that should be private to src/string.c 2014-06-06 00:19:46 +09:00
yui-knk 45305686fe Add a space aftre bracket. 2014-05-18 19:40:17 +09:00
Jun Hiroe 932efe53e9 Refactor mrb_str_intern() in string.c 2014-05-17 13:22:43 +09:00
Jun Hiroe 944b395083 Refactor mrb_str_equal_m in string.c 2014-05-17 13:22:43 +09:00
Jun Hiroe cf680f05fb Refactor mrb_str_new() in string.c 2014-05-17 13:20:00 +09:00
Jun Hiroe 7328169a13 Fix indents 2014-05-17 00:20:32 +09:00
Yukihiro "Matz" Matsumoto d44035f26f Merge pull request #2194 from suzukaze/refactor-string.c2
Refactor string.c
2014-05-05 21:08:08 +09:00
Yukihiro "Matz" Matsumoto 1ce9060fa9 Merge pull request #2195 from suzukaze/fix-indent-string.c
Fix indents in mrb_str_inspect() of string.c
2014-05-05 20:22:00 +09:00
Jun Hiroe e8afac3ed7 Fix indents in mrb_str_inspect() of string.c 2014-05-05 13:04:58 +09:00
Jun Hiroe 06e56a5004 Refactor mrb_str_hash() 2014-05-05 12:59:42 +09:00
Jun Hiroe b9dc9ccd14 Refacotr mrb_str_substr() 2014-05-05 12:56:20 +09:00
Jun Hiroe fdde840d06 Refactor mrb_str_upcase_bang 2014-05-05 12:51:04 +09:00
Jun Hiroe 2f8de5b32b Refactor mrb_str_split_m() 2014-05-05 12:49:08 +09:00
Jun Hiroe e340babc1e Refactor mrb_str_downcase_bang() 2014-05-05 12:42:57 +09:00
Jun Hiroe c6551e03e0 Refactor mrb_str_capitalize_bang() 2014-05-05 12:40:15 +09:00
Yukihiro "Matz" Matsumoto 5fb5c2a4c2 Merge pull request #2155 from cremno/define-resize_capa-as-a-function
define `resize_capa` as a function
2014-04-29 17:10:27 +09:00
Yukihiro "Matz" Matsumoto 8639703bec Merge pull request #2157 from cremno/remove-mrb_str_offset
remove `mrb_str_offset`
2014-04-29 17:08:04 +09:00
cremno 739b155535 remove mrb_str_offset 2014-04-29 07:13:44 +02:00
cremno 0406343f2b remove DBL_DIG fallback definition 2014-04-29 06:21:49 +02:00
cremno 5b3a442d31 include the missing header for DBL_DIG 2014-04-29 06:21:29 +02:00
cremno 92632c61dd define resize_capa as a function
This increases readability and maintainability,
and it also doesn't use reserved identifiers.
2014-04-29 06:09:45 +02:00
cremno 91c22f32f4 rename mrb_str_buf_append to mrb_str_cat_str
The new name is better and less confusing, because:
  - `mrb_str_append` calls `mrb_str_to_str` and this function doesn't
  - `mrb_str_buf_append` _is_ `mrb_str_cat` for `mrb_value` strings
2014-04-27 22:33:22 +02:00
Yukihiro "Matz" Matsumoto 48f36d3f0e better integer size assertion suggested by usak 2014-04-25 04:33:08 +09:00
Yukihiro "Matz" Matsumoto 83c1399af0 eliminate plain int except for a few cases like arena_index 2014-04-25 04:01:57 +09:00
Yukihiro "Matz" Matsumoto 320f0711f0 remove -Wsign-compare warnings 2014-04-25 02:33:33 +09:00
cremno bc23a5e9e5 remove mrb_str_buf_cat
It does the same as `mrb_str_cat`.
2014-04-21 21:28:06 +02:00
take_cheeze 699964a86e Use mrb_regexp_p to check regexp. 2014-04-17 14:32:45 +09:00
take_cheeze c0eaaf3559 Move src/re.h to include/mruby/re.h . 2014-04-16 22:39:57 +09:00
Yukihiro "Matz" Matsumoto 5138f62d6b resolve conflict 2014-04-15 10:55:46 +09:00
ksss d305a9dad7 mrb_str_dup use sheard string instead of new string 2014-04-12 04:44:56 +00:00