Commit Graph

245 Commits

Author SHA1 Message Date
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
Yukihiro "Matz" Matsumoto 9f6d69ee56 simplify string equality check 2014-04-04 12:06:13 +09:00
Yukihiro "Matz" Matsumoto 653ddd6d3e downto, upto, step to return Enumerator 2014-04-03 20:19:54 +09:00
Yukihiro "Matz" Matsumoto 70718d5935 an int literal may have multiple underscores inside 2014-03-27 13:33:14 +09:00
Yukihiro "Matz" Matsumoto 9434506035 allow underscores in integer literals; close #1960 2014-03-27 12:33:32 +09:00
ksss c82517862a Fix unnecessary string macro 2014-03-25 23:03:47 +09:00
cubicdaiya 6e648d6382 Use mrb_int instead of int 2014-03-25 11:36:47 +09:00
ksss e6e462c07d src/string.c RESIZE_CAPA use safe name variables
This has a possibility of naming conflicts
2014-03-24 23:05:44 +09:00
Yukihiro "Matz" Matsumoto 539d9cb855 need not to add assertion in STR_SET_LEN() where n is mrb_int 2014-03-22 22:33:09 +09:00
cubicdaiya 51947f132b Use bool-macro instead of magic-number 2014-03-22 09:55:48 +09:00
Yukihiro "Matz" Matsumoto 792c1add0c string functions arguments changed from mrb_int to size_t that would take strlen() 2014-03-19 00:46:27 +09:00
cubicdaiya cee152670a unify indent style 2014-03-16 07:44:44 +09:00
Yukihiro "Matz" Matsumoto 048bca43c9 string length type to be mrb_int 2014-03-15 15:47:21 +09:00
ksss 49a048c544 set bit field for mrb_bool 2014-03-10 13:14:07 +00:00
Yukihiro "Matz" Matsumoto 4f27089b4a Merge branch 'master' of github.com:mruby/mruby 2014-03-09 03:16:28 +09:00
cremno bfc522bcd5 use mrb_str_cat_lit for literals 2014-03-08 18:38:31 +01:00
Yukihiro "Matz" Matsumoto 6423011986 remove invocation of strlen() on buffer of strings; with refactoring 2014-03-09 02:35:49 +09:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +09:00
ksss 54132e4364 make embed string when create literals 2014-03-06 13:47:51 +00:00
ksss 4070b5987a embed small string
use flags 4 for *this object is embed*
use flags 8~64 for *embed string length*
2014-03-06 13:12:08 +00:00
cubicdaiya ebe4711df8 fix off-by-one error in String#rindex(fixnum)
null-terminated string should not be included in search targets.
2014-03-04 21:58:47 +09:00
Yukihiro "Matz" Matsumoto 18f0fcb0c7 add new macros for MRB_STR_SHARED operations, based on 0f7aecf from @ksss; ref #1782 2014-03-04 01:33:58 +09:00