Tatsuhiko Kubo
093560e7d1
Use suitable type.
2014-12-27 10:18:18 +09:00
Yukihiro "Matz" Matsumoto
2732879f3e
String#[]: float handling merged to #2677
2014-12-17 20:19:52 +09:00
Yukihiro "Matz" Matsumoto
4319eaaa45
try to convert not only nil but every objects to fixnums; ref #2677
2014-12-17 20:08:26 +09:00
h2so5
05b00a14c5
String#[] should reject nil index
2014-12-17 14:01:39 +09:00
Yukihiro "Matz" Matsumoto
a19a6edb7c
mrb_str_new(mrb, "", len) creates an unmodifiable string object; ref #2674
2014-12-17 08:06:44 +09:00
Yukihiro "Matz" Matsumoto
e1a7fa925e
add "fall through" comment
2014-11-26 01:03:57 +09:00
Robert Mosolgo
0133d9ac70
fix(String) String#[] accepts float; close #2650 #2651
2014-11-26 01:03:38 +09:00
Hiroyuki Matsuzaki
e77ea4e5f2
fixed. cygwin-gcc(ver4.8.3) warning in conv_digit()
2014-10-02 19:50:58 +09:00
Yukihiro "Matz" Matsumoto
b72e94fa6b
mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.
...
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them.
for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
2014-09-30 23:48:57 +09:00
Tatsuhiko Kubo
cfb321e877
Add inline to str_with_class().
2014-09-09 00:44:49 +09:00
cremno
26bbc81e12
get rid of shadowing variables
...
Mostly by renaming the shadowing variable.
If a shadowing variable was deleted,
the shadowed one can be used instead.
2014-09-03 10:00:37 +02:00
Tatsuhiko Kubo
6b8e06a5b9
Remove unused macro.
...
OutOfRange() is no longer used.
2014-08-29 02:22:55 +09:00
Yukihiro "Matz" Matsumoto
9e4b012478
Merge pull request #2570 from cubicdaiya/issues/unify_duplicated_functions
...
Unify and rename duplicated functions (noregexp() and regexp_check()).
2014-08-29 01:09:33 +09:00
Tatsuhiko Kubo
5fa30aeaea
Fix mismatches for MRB_API declarations.
2014-08-29 01:06:22 +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
3202938099
Add a missing space after ",".
2014-08-27 19:13:40 +09:00
kkkkkt
b27738f036
changed some string method's mrb-aspec
2014-08-12 16:20:02 +09:00
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