Method: String#escapeWhitespace
- Defined in:
- lib/antlr4/base.rb
#escapeWhitespace(escapeSpaces = false) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/antlr4/base.rb', line 29 def escapeWhitespace(escapeSpaces=false) if escapeSpaces then c = "\xB7" else c = " " end gsub(" ", c).gsub("\t","\\t").gsub("\n","\\n").gsub("\r","\\r") end |