Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/win32/file/functions.rb
Instance Method Summary collapse
-
#wstrip ⇒ Object
Read a wide character string up until the first double null, and delete any remaining null characters.
Instance Method Details
#wstrip ⇒ Object
Read a wide character string up until the first double null, and delete any remaining null characters.
45 46 47 48 |
# File 'lib/win32/file/functions.rb', line 45 def wstrip self.force_encoding('UTF-16LE').encode('UTF-8',:invalid=>:replace,:undef=>:replace). split("\x00")[0].encode(Encoding.default_external) end |