mayusculas a minusculas
Publicado por carlos (1 intervención) el 09/10/2013 23:12:12
estoy recien aprendiendo ruby quisiera saber como puedo hacer esto???
QUISIERA POR FAVOR Q ALGUIEN ME LO CORRIJA POR FAVOR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
input: " Esto es ESparta"
out: " Ethto eth ETHparta "
print "thu thtring por favor"
input = gets.chomp
input.downcase!
input.capitalize!
#condicion if string_to_check.include? "substring"
#cambiar TH por s string_to_change.gsub! (/TH/, "s")
if input.include? "s"
input.gsub!(/s/, "TH")
print input
else
print "no se encontro ninguna s"
end
QUISIERA POR FAVOR Q ALGUIEN ME LO CORRIJA POR FAVOR
Valora esta pregunta


0