Parent

Methods

Ole::Types::Lpwstr

for VT_LPWSTR

Constants

FROM_UTF16
TO_UTF16

Public Class Methods

dump(str) click to toggle source
# File lib/ole/types/base.rb, line 48
def self.dump str
  # need to append nulls?
  data = TO_UTF16.iconv str
  # not sure if this is the recommended way to do it, but I want to treat
  # the resulting utf16 data as regular bytes, not characters.
  data.force_encoding Encoding::ASCII_8BIT if data.respond_to? :encoding
  data
end
load(str) click to toggle source
# File lib/ole/types/base.rb, line 44
def self.load str
  new FROM_UTF16.iconv(str).chomp(0.chr)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.