Class: Ole::Types::Lpstr

Inherits:
String
  • Object
show all
Defined in:
lib/ole/types/base.rb

Class Method Summary collapse

Methods inherited from String

#each_chunk

Class Method Details

.dump(str) ⇒ Object



33
34
35
36
# File 'lib/ole/types/base.rb', line 33

def self.dump str
	# do i need to append the null byte?
	str.to_s
end

.load(str) ⇒ Object



27
28
29
30
31
# File 'lib/ole/types/base.rb', line 27

def self.load str
	# not sure if its always there, but there is often a trailing
	# null byte.
	new str.chomp(0.chr)
end