Dart克隆 Darts-clone.rb是的Ruby绑定。 安装 将此行添加到您的应用程序的Gemfile中: gem 'dartsclone' 然后执行: $ bundle install 或将其自己安装为: $ gem install dartsclone 用法 require 'dartsclone' da = DartsClone :: DoubleArray . new # Construct a dictionary. keys = [ 'abc' , 'abcd' , 'abcde' , 'bcd' , 'cde' ] da . build ( keys ) # Search for keys which match the prefix of given string. p da . common_prefix_search ( 'abcde' ) # => [