class String
Public Instance Methods
as_pdf()
click to toggle source
If the string is ASCII only, convert it to a PDF
LiteralString object. Otherwise, return self.
# File lib/asciidoctor/pdf/ext/core/string.rb, line 13 def as_pdf ascii_only? ? (::PDF::Core::LiteralString.new encode ::Encoding::ASCII_8BIT) : self end
pred()
click to toggle source
# File lib/asciidoctor/pdf/ext/core/string.rb, line 4 def pred # integers (Integer self).pred.to_s rescue ::ArgumentError # chars (upper alpha, lower alpha, lower greek) ([65, 97, 945].include? ord) ? '0' : ([ord - 1].pack 'U1') end