Ruby 3 · Basics

Common string methods

Strings have many helpers.

"  Hello World ".strip.downcase.split(" ").map(&:capitalize).join("-")

Official Ruby 3 documentation

More basics commands

All basics commands · Ruby 3 cheatsheet

Was this page helpful?