Anyone heard of a good standard template library in Ruby? Or any wrapper exists?
Thanks!
Anyone heard of a good standard template library in Ruby? Or any wrapper exists?
Thanks!
If you are referring to something like the C++ STL, then this is largely built in to Ruby already. Ruby has a large suite of basic data structures and other utilities.
As in, C/C++ STL support? All of the functionality is there. You have Strings, Integers (can take on any value, not limited to 232 (int), 264 (long), etc.), Arrays, Hashes and etc. When you want a Queue or a Stack just use an array using the push
, pop
, delete_at(0)
. Iterations can be done with
some_array.each { |x|
#some action
}