Mega Code Archive

 
Categories / Ruby / String
 

String operation on escape char

"\\".size                          # => 1 "\\" == "\x5c"                     # => true "\\n"[0] == ?\\                    # => true "\\n"[1] == ?n                     # => true "\\n" =~ /\n/                      # => nil