Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/win32/process/helper.rb

Instance Method Summary collapse

Instance Method Details

#to_wide_stringObject

Convert a regular string to a wide character string. This does not modify the receiver.



4
5
6
# File 'lib/win32/process/helper.rb', line 4

def to_wide_string
  (self + 0.chr).encode("UTF-16LE")
end

#to_wide_string!Object

Convert a regular string to a wide character string. This modifies the receiver.



10
11
12
# File 'lib/win32/process/helper.rb', line 10

def to_wide_string!
  replace((self + 0.chr).encode("UTF-16LE"))
end