Module: Puppet::Util::Windows::String Private

Included in:
Process, File, Process, Security, Service, User
Defined in:
lib/puppet/util/windows/string.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.wide_string(str) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


5
6
7
8
9
10
# File 'lib/puppet/util/windows/string.rb', line 5

def wide_string(str)
  # if given a nil string, assume caller wants to pass a nil pointer to win32
  return nil if str.nil?

  str.encode('UTF-16LE')
end