Class: MCP::MCString

Inherits:
BinData::Primitive
  • Object
show all
Defined in:
lib/mcp/types.rb

Instance Method Summary collapse

Instance Method Details

#getObject



47
# File 'lib/mcp/types.rb', line 47

def get; return self.data.force_encoding("utf-16be").encode("utf-8"); end

#set(a) ⇒ Object



48
49
50
51
# File 'lib/mcp/types.rb', line 48

def set(a) 
  length = a.length
  self.data = a.encode("utf-16be")
end