summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-string-ext/mrblib/string.rb
AgeCommit message (Collapse)Author
2018-09-19Removed `String#try_convert` method from `mruby-string-ext` gem.Yukihiro "Matz" Matsumoto
Because `try_convert` method rarely used in production. For mruby users, we have `__to_str` utility method to check string type.
2018-09-19Remove implicit conversion using `to_str` method.Yukihiro "Matz" Matsumoto
We have added internal convenience method `__to_str` which does string type check.
2018-04-21Implement `String#upto` in Ruby.Yukihiro "Matz" Matsumoto
Avoid using `mrb_yield` in C code. The function is not recommended. Because it doesn't work well with fibers.
2018-04-19CRuby2.6 stops deprecating `String#lines` with a block.Yukihiro "Matz" Matsumoto
`String#lines` (with a block) is now implemented in Ruby.
2017-12-12Modifying frozen objects will raise `FrozenError`.Yukihiro "Matz" Matsumoto
`FrozenError` is a subclass of `RuntimeError` which used to be raised. [Ruby2.5]
2017-10-17Add `{String,Symbol}#casecmp?`; CRuby2.4Yukihiro "Matz" Matsumoto
2017-06-14Reimplement String#uptoksss
2017-03-10Terminate loop if generated string longer than the last; ref #3489Yukihiro "Matz" Matsumoto
2017-03-05Check modifiable for String `bang' methodsksss
2017-02-10String#ljust and String#rjust reimplemented with optimized RubyTomasz Dabrowski
2017-02-10String#ljust and String#rjust reimplementation (fix #3445)Tomasz Dabrowski
- String#ljust and String#rjust are now C functions to improve performance - infinite loop because of an empty padding argument is now prevented (ArgumentError is raised) - extra tests for ljust/rjust added
2017-01-04Rewrite String#prepend with Rubyksss
Fix #3357
2016-11-17String#{strip,lstrip,rstrip} may cause OOB accessYukihiro "Matz" Matsumoto
2016-09-28Removed trailing spacesNobuyoshi Nakada
2016-07-27Reduce needless Array generation in some String methodsKouhei Sutou
Here are some benchmarks: each_char: # /tmp/each_char.rb a = "a" * 1000000 a.each_char do |x| end Without this change: % time bin/mruby /tmp/each_char.rb bin/mruby /tmp/each_char.rb 1.07s user 0.02s system 99% cpu 1.088 total With this change: % time bin/mruby /tmp/each_char.rb bin/mruby /tmp/each_char.rb 0.52s user 0.01s system 99% cpu 0.530 total 2 times faster with this change. codepoints: # /tmp/codepoints.rb a = "a" * 1000000 a.codepoints do |x| end Without this change: % time bin/mruby /tmp/codepoints.rb bin/mruby /tmp/codepoints.rb 1.16s user 0.05s system 99% cpu 1.216 total With this change: % time bin/mruby /tmp/codepoints.rb bin/mruby /tmp/codepoints.rb 0.56s user 0.02s system 99% cpu 0.589 total
2016-07-26Support to call without block to String#each_charksss
2016-07-14String#insert should be destructiveksss
2016-01-30Add String#rjust to mruby-string-extAkira Moroo
2015-11-24add {Array|Hash|String}.try_converttakahashim
2015-09-24UTF-8 string support in coreYukihiro "Matz" Matsumoto
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
2015-08-22Use #nil? instead of == nil.INOUE Yasuyuki
2015-01-13Add String#uptoJun Hiroe
2015-01-12add String#ljust into mruby-string-exttakahashim
2014-12-13Add String#insertJun Hiroe
2014-11-23Fix String#slice! raise TypeError or return invalid value.TOMITA Masahiro
2014-06-19Modify return value of String#slice! if idx == self.sizeAkito Mochizuki
2014-06-15Implement String#slice_bangJun Hiroe
2014-06-11String#clear: use String#replace to simpleksss
2014-06-03Merge pull request #2346 from suzukaze/add-string-comment2Yukihiro "Matz" Matsumoto
Fix indent in String#casecmp comments
2014-06-02Fix indent in String#casecmp commentsJun Hiroe
2014-06-02Add comments in String#lstrip, rstrip, strip, lstring_bang, rstrip_bang and ↵Jun Hiroe
strip_bang
2014-04-20String#casecmp should be call `to_str`ksss
when non String object sent And should be raise TypeError when can not responsed to `to_str`
2013-12-27add String#partition and String#rpartition.Tomoyuki Sahara
2013-04-19Add String#swapcase,swapcase!,concat,casecmp,start_with,end_withh2so5
2013-03-08add "strip" family to String.Tomoyuki Sahara