Class: Resedit::SlashEscaper

Inherits:
TextEscaper show all
Defined in:
lib/resedit/text/escaper.rb

Direct Known Subclasses

StdEscaper

Constant Summary

Constants inherited from TextEscaper

TextEscaper::STD_TABLE

Instance Method Summary collapse

Methods inherited from TextEscaper

#escape

Instance Method Details

#_escape(b) ⇒ Object



62
63
64
65
# File 'lib/resedit/text/escaper.rb', line 62

def _escape(b)
    return '\\\\' if b==0x5c
    b<0x20 ? sprintf("\\x%02X", b) : b.chr
end

#unescape(line) ⇒ Object



67
68
69
# File 'lib/resedit/text/escaper.rb', line 67

def unescape(line)
    tableReplace(line,{0x5C=>"\\\\"})
end