module XML::SimpleTree
begin¶ ↑
Module XML::DOM (XML::SimpleTree)¶ ↑
DOM-like APIs module.
end¶ ↑
begin¶ ↑
Module XML::DOM (XML::SimpleTree)¶ ↑
end¶ ↑
Constants
- Attribute
begin¶ ↑
Class XML::DOM::Attr¶ ↑
superclass¶ ↑
end¶ ↑
Public Class Methods
tou16(str)
click to toggle source
# File lib/xml/dom/digest.rb, line 12 def self.tou16(str) if defined?(::Encoding) str.encode(::Encoding::UTF_16BE).force_encoding(::Encoding::ASCII_8BIT) else str.unpack("U*").map {|v| if v >= 0x10000 && v <= 0x10ffff ## surrogate pair hi = ((v - 0x10000) >> 10) | 0xd800 low = (v & 1023) | 0xdc00 [hi, low].pack("n*") else [v].pack("n*") end }.join end end