Escape a single quote : Escape Characters « String « Ruby






Escape a single quote


puts 'it may look like this string contains a newline\nbut it doesn\'t'

 








Related examples in the same category

1.Escape Characters list
2.Escape backslash
3.Put a string with control character
4.Check the length of a string which has the control character inside
5.Representing Unprintable Characters
6.Escape sequence and hex number
7.Construct a string from hex value
8.String operation on escape char
9.Tab key in double quotation
10.Use Tab key in {}
11.use tab key in %Q{}
12.Tab key in single quotation mark
13.tab key in %q{}