Ruby LanguageStrings


Syntax

  • 'A string' // creates a string via single-quoted literal
  • "A string" // creates a string via double-quoted literal
  • String.new("A string")
  • %q(A string) // alternative syntax for creating single quoted strings
  • %Q(A string) // alternative syntax for creating double quoted strings