"Turing".length or "Turing".size
#6
"Turing".size == 0
#true
"".empty?
#true
"Turing".reverse
# “gniruT”
"Turing".upcase
# “TURING”
"TURING".downcase
# “turing”
"turing".capitalize
# “Turing”
"Turing".include? "z"
# equals to false because there is no z in Turing
"Turing".gsub!(/[ri]/, "z")
# Tuzzng
"1".to_i
#1
"turing".to_sym or "turing".intern
#:turing
:turing.to_s
#"turing"
can pass argument into this method to specify a different separator
"turing".split
#['t', 'u', 'r', 'i', 'n', 'g']
turing_array = ['t', 'u', 'r', 'i', 'n', 'g']
turing_array.join
# "turing"
string = "turing"
string.each_char { |letter| puts letter }
#t
#u
#r
#i
#n
#g
allows you to combine strings together
name = "Turing"
puts "#{name} is life!"
# "Turing is life!"
takes two arguments: first argument is length of final string second argument is what string will be padded with
binary_string = "1111"
binary_string.rjust(7, "0")
# "0001111"
if you want to pad to the right you can use ljust
binary_string = "1111"
binary_string.ljust(7, "0")
# "1111000"