String extensions

8 views
Skip to first unread message

nardele salomon

unread,
Nov 29, 2013, 11:39:50 AM11/29/13
to rubyonra...@googlegroups.com


I started project to create a library of  basic functions (or 'helpers' as you wish) .

The start with ds_string.   want to  contribute:  was already made ​​available at rubygem.org

Has two basic functions:

"A".times(3) => "AAA" (like "A" * 3 )
"A".times(3) do |s| "#{s}-" end  => "A-A-A-"
"1".to_b  => true
"yes".to_b => true

=)
Nardele Salomon

Reply all
Reply to author
Forward
0 new messages