Class: Nendo::LispString
- Inherits:
-
String
- Object
- String
- Nendo::LispString
- Defined in:
- lib/nendo/ruby/types.rb
Class Method Summary collapse
Class Method Details
.escape(str) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/nendo/ruby/types.rb', line 58 def LispString.escape( str ) if str.is_a? String str.gsub( /\\/, "\\\\\\\\" ).gsub( /["]/, "\\\"" ).gsub( /[\r]/, "\\r" ).gsub( /[\t]/, "\\t" ) else raise TypeError end end |