cremno
6a74b8bf0d
add missing fall through comments
2015-07-02 22:11:21 +02:00
cremno
2ee84eb3df
remove unnecessary including of <ctype.h>
...
Not needed anymore since 85075bef75
2015-05-28 10:44:20 +02:00
Tomoyuki Sahara
5f68be7190
String#[] accepts float.
2014-12-05 13:42:58 +09:00
Tatsuhiko Kubo
db29a25ada
Rename functions for avoinding symbol confiliction.
...
Add prefix(mrb) to noregexp() and regexp_check().
2014-08-28 19:18:52 +09:00
Tatsuhiko Kubo
d958aa2cb1
Unify duplicated functions (noregexp() and regexp_check()).
2014-08-28 19:13:57 +09:00
Tatsuhiko Kubo
5b5313ec97
use C style comments instead of C++ style comments
2014-07-13 00:24:45 +09:00
Santa Zhang
17ecbaa23d
add a few const qualifier
2014-06-25 07:53:23 +09:00
Yukihiro "Matz" Matsumoto
32e450166f
move STR_* macros to mruby/string.h with renaming
2014-06-07 22:16:16 +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
mattn
6d0388c68e
Refactor variable definitions
2014-06-04 10:28:34 +09:00
mattn
5410b9c46c
arena save/restore
2014-06-04 10:20:51 +09:00
mattn
f18771eb42
Add String#chars, String#each_char, String#codepoints, String#each_codepoint
2014-06-04 10:10:58 +09:00
Yukihiro "Matz" Matsumoto
c31c6c0833
Merge pull request #2352 from suzukaze/fix-indent
...
Fix indents in mruby-string-utf8
2014-06-04 09:12:46 +09:00
Yukihiro "Matz" Matsumoto
82515722ff
Merge pull request #2353 from suzukaze/refactor-string-utf8
...
Refactor mrb_utf8_strlen() in mruby-string-utf8
2014-06-04 09:12:25 +09:00
Jun Hiroe
ce45304ec4
Refactor mrb_utf8_strlen() in mruby-string-utf8
2014-06-03 20:56:17 +09:00
Jun Hiroe
73874f4008
Fix indents in mruby-string-utf8
2014-06-03 20:53:51 +09:00
mattn
ab0b1c4783
Implement String#chr for utf-8
2014-06-03 20:20:30 +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
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
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
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
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
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