Class: Nendo::LispString
- Inherits:
-
String
- Object
- String
- Nendo::LispString
- Defined in:
- lib/nendo.rb
Class Method Summary collapse
Class Method Details
.escape(str) ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/nendo.rb', line 65 def LispString.escape( str ) if str.is_a? String str.gsub( /\\/, "\\\\\\\\" ).gsub( /["]/, "\\\"" ).gsub( /[\r]/, "\\r" ).gsub( /[\t]/, "\\t" ) else raise TypeError end end |