Skip to content

Commit

Permalink
Text stripping for uC function
Browse files Browse the repository at this point in the history
Fixed a bug with the cU function where it was stripping leading white space
  • Loading branch information
matthewtidd authored Sep 18, 2017
1 parent e6f0f75 commit 9db90d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nwrfc/nwrfclib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def cU

# Convert string from UTF-16LE to UTF-8 and trim trailing whitespace
def uC
self.force_encoding('UTF-16LE').encode('UTF-8').strip
self.force_encoding('UTF-16LE').encode('UTF-8').rstrip
end

end
Expand All @@ -82,7 +82,7 @@ def cU

# Convert string from UTF-16LE to UTF-8 and trim trailing whitespace
def uC
NWRFCLib::Cutf16le_to_utf8.iconv(self).strip
NWRFCLib::Cutf16le_to_utf8.iconv(self).rstrip
end

end
Expand Down

0 comments on commit 9db90d6

Please sign in to comment.