join

ary.join(separator=$,) รข str
Instance Public methods

Returns a string created by converting each element of the array to a string, separated by the given separator. If the separator is nil, it uses current $,. If both the separator and $, are nil, it uses empty string.

[ "a", "b", "c" ].join        #=> "abc"
[ "a", "b", "c" ].join("-")   #=> "a-b-c"
doc_ruby_on_rails
2015-03-30 17:50:13
Comments
Leave a Comment

Please login to continue.