Cheatography
https://cheatography.com
List of all available methods for ruby array and string.
Array predicates
#all? |
#any? |
#empty? |
#eql? |
#include? |
#none? |
#one? |
String predicates
#ascii_only? |
#casecmp? |
#casecmp |
#empty? |
#end_with? |
#eql? |
#include? |
#match? |
#match |
#start_with? |
#unicode_normalized? |
#valid_encoding? |
Array conversions
#old_to_s |
#to_a |
#to_ary |
#to_h |
#to_s |
String conversion
#to_a |
#to_c |
#to_f |
#to_i |
#to_r |
#to_s |
#to_str |
#to_sym |
Array common
#each |
#each_index |
#filter |
#filter! |
#find_index |
#first |
#join |
#length |
#map |
#map! |
#last |
#max |
#min |
#pop |
#prepend |
#reverse |
#reverse! |
#sample |
#slice |
#slice! |
#sort |
#sort! |
#sort_by! |
String common
#capitalize |
#capitalize! |
#downcase |
#downcase! |
#freeze |
#gsub |
#gsub! |
#length |
#prepend |
#reverse |
#reverse! |
#slice |
#slice! |
#split |
#chars |
#upcase |
#upcase! |
|
|
String uncommon
#b |
#bytes |
#bytesize |
#byteslice |
#center |
#chomp |
#chomp! |
#chop |
#chop! |
#chr |
#clear |
#codepoints |
#concat |
#count |
#crypt |
#delete |
#delete! |
#delete_prefix |
#delete_prefix! |
#delete_suffix |
#delete_suffix! |
#dump |
#each_byte |
#each_char |
#each_codepoint |
#grapheme_clusters |
#each_grapheme_cluster |
#each_line |
#encode |
#encode! |
#encoding |
#force_encoding |
#getbyte |
#hash |
#hex |
#index |
#initialize_copy |
#insert |
#inspect |
#intern |
#lines |
#ljust |
#lstrip |
#lstrip! |
#next |
#next! |
#oct |
#ord |
#partition |
#replace |
#rindex |
#rjust |
#rpartition |
#rstrip |
#rstrip! |
#scan |
#scrub |
#scrub! |
#setbyte |
#size |
#squeeze |
#squeeze! |
#strip |
#strip! |
#sub |
#sub! |
#succ |
#succ! |
#sum |
#swapcase |
#swapcase! |
#tr |
#tr! |
#tr_s |
#tr_s! |
#undump |
#unicode_normalize |
#unicode_normalize! |
#unpack |
#unpack1 |
#upto |
|
|
Array uncommon
#append |
#assoc |
#at |
#bsearch |
#bsearch_index |
#clear |
#collect |
#collect! |
#combination |
#compact |
#compact! |
#concat |
#cycle |
#deconstruct |
#delete |
#delete_at |
#delete_if |
#difference |
#dig |
#drop |
#drop_while |
#fetch |
#fill |
#find_index |
#flatten |
#flatten! |
#hash |
#index |
#initialize_copy |
#insert |
#inspect |
#intersection |
#keep_if |
#minmax |
#pack |
#permutation |
#product |
#rassoc |
#reject |
#reject! |
#repeated_combination |
#repeated_permutation |
#replace |
#reverse_each |
#rindex |
#rotate |
#rotate! |
#select |
#select! |
#shift |
#shuffle |
#shuffle! |
#sum |
#take |
#take_while |
#transpose |
#union |
#uniq |
#uniq! |
#unshift |
#values_at |
#zip |
#count |
#size |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by nirintsoa