Ruby Language Strings

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

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


Got any Ruby Language Question?