From c9859c4f8481d6cef8b684ab82a37d46d5f9955c Mon Sep 17 00:00:00 2001 From: Nacho Date: Sun, 13 Sep 2026 17:45:45 -0300 Subject: [PATCH] Add string manipulation features in strings.rb --- strings.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 strings.rb diff --git a/strings.rb b/strings.rb new file mode 100644 index 0000000..24e312d --- /dev/null +++ b/strings.rb @@ -0,0 +1,7 @@ +# strings.rb +print "Ingresa tu nombre: " +nombre = gets.chomp # .chomp elimina el salto de línea al presionar Enter + +puts "¡Hola, #{nombre.capitalize}!" +puts "Tu nombre al revés es: #{nombre.reverse}" +puts "Tiene #{nombre.length} letras."