Commit Graph

29 Commits

Author SHA1 Message Date
Nobuyoshi Nakada ab67c57f65 remove trailing spaces 2014-04-30 09:50:14 +09:00
Yukihiro "Matz" Matsumoto 0584551eb9 mruby-string-utf8: use mrb_int instead of size_t 2014-04-26 10:43:32 +09:00
take_cheeze b5028421b9 Use mrb_int in mrbgem rest argument getting. 2014-04-25 22:02:10 +09:00
Jun Hiroe cd948b0501 Fix typos in tests for mruby-string-utf8 2014-04-20 02:14:42 +09:00
Jun Hiroe 29bbeb1512 Add tests for utf8-string#rindex 2014-04-19 01:12:58 +09:00
Yukihiro "Matz" Matsumoto 73c0ea5ffa mruby-string-utf8: update UTF-8 tests; ref #2076 2014-04-18 23:46:18 +09:00
Yukihiro "Matz" Matsumoto b2422cf021 mruby-string-utf8: str_subseq takes UTF-8 index, not byte index; ref #2076 2014-04-18 23:45:26 +09:00
mattn 280f9dfc19 Add one more test 2014-04-18 21:05:03 +09:00
mattn 1d5e100e07 Add test for String#ord, String#split for mruby-string-utf8 2014-04-18 21:00:59 +09:00
mattn d72b8c201d Implement String#ord, String#split for mruby-string-utf8 2014-04-18 02:26:17 +09:00
Yukihiro "Matz" Matsumoto 7c1b3f8a86 mruby-string-utf8: String#reverse! may leak memory when mrb_str_modify() raises exception 2014-04-18 00:56:50 +09:00
mattn db88af83df Cosmetic change 2014-04-17 19:51:45 +09:00
mattn ba5a995c23 Handle utf-8 code in index/rindex 2014-04-17 19:47:01 +09:00
mattn 9d520ae739 Implement String#index, fixes #2073 2014-04-17 18:22:07 +09:00
take_cheeze 699964a86e Use mrb_regexp_p to check regexp. 2014-04-17 14:32:45 +09:00
take_cheeze b5824f3649 Use mruby/re.h instead of duplicate definition. 2014-04-16 22:41:22 +09:00
take_cheeze 96f40c9ec4 Add test for UTF-8 string String#size . 2014-04-15 22:39:52 +09:00
cubicdaiya e157c63c18 use suitable type 2014-03-27 03:18:20 +09:00
cubicdaiya b7c3a7d181 Use mrb_int instead of int 2014-03-25 15:02:32 +09:00
take_cheeze c35b0c5245 add summary to mrbgems without it 2014-03-17 00:34:25 +09:00
Yukihiro "Matz" Matsumoto adc5b56c15 use mrb_int instead of size_t since string length is represented by mrb_int; close #1810 2014-03-05 21:51:44 +09:00
chasonr 5e5ee841a1 Implement sprintf("%c") for UTF-8.
* sprintf("%c") is changed to accept a string for which String#size returns
  1, even if it is longer than one byte, and to convert a Fixnum via
  Fixnum#chr (possibly returning more than one byte).  Thus, if the UTF-8
  gem is in use, a character will be understood as a single UTF-8 character.

* The change to sprintf depends on the implementation of Fixnum#chr added
  to mrbgems/mruby-string-utf8/src/string.c.

This should work with any other gem that implements a multibyte encoding, as
long as it implements String#size and Fixnum#chr as appropriate.
2014-02-26 20:18:26 -05:00
h2so5 1717666662 fix utf-8 codepage 2014-01-23 03:38:54 +09:00
h2so5 61745a4727 String#length should be an alias of String#size 2014-01-10 20:01:04 +09:00
h2so5 7fc9264b0f add String#reverse, String#reverse! for UTF-8 2014-01-08 02:21:19 +09:00
mattn 993095cb7c Remove duplicate test 2014-01-07 16:57:25 +09:00
Yukihiro "Matz" Matsumoto 78ab979ef9 mruby-string-utf8: redefine String#size for UTF-8 string; #1646 2014-01-07 16:24:09 +09:00
Yukihiro "Matz" Matsumoto dc25f85bab mruby-string-utf8: UTF-8 string may contail NUL; #1646 2014-01-07 15:00:55 +09:00
mattn 055468bfa0 Add mruby-string-utf8 2014-01-07 14:25:08 +09:00