Class/Module Index [+]

Quicksearch

Origami::String::Encoding::UTF16BE

Constants

MAGIC

Public Class Methods

to_pdfdoc(str) click to toggle source
# File lib/origami/string.rb, line 99
def UTF16BE.to_pdfdoc(str)
  pdfdoc = []
  i = 2

  while i < str.size
    char = PDFDocEncoding::CHARMAP.index(str[i,2])
    raise EncodingError, "Can't convert UTF16-BE character to PDFDocEncoding" if char.nil?
    pdfdoc << char
    i = i + 2
  end

  pdfdoc.pack("C*")
end
to_utf16be(str) click to toggle source
# File lib/origami/string.rb, line 95
def UTF16BE.to_utf16be(str)
  str
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.