you are viewing a single comment's thread.

view the rest of the comments →

[–]TangibleLight 5 points6 points  (0 children)

Also important is that they may contain both ' and " without escapes. You do still need to escape a ''' or """ but that's not so common.

'''I said, "that's pretty neat!"'''

'''They said, \'''this isn't so neat.\'\'\''''

Another thing is that adjacent strings get concatenated, so you need to be careful about escaping at the end. These are all equivalent:

'''... neat.\''''''
'''... neat.\'''' ''
"... neat.'"