Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/pdfbeads.rb,
lib/imageinspector.rb
Instance Method Summary collapse
Instance Method Details
#ord ⇒ Object
87 88 89 90 91 92 93 |
# File 'lib/pdfbeads.rb', line 87 def ord() begin return Iconv.iconv( 'utf-16be','utf-8',self ).first.unpack('n')[0] rescue return 0x3F # Question mark end end |
#to_binary ⇒ Object
69 70 71 72 |
# File 'lib/pdfbeads.rb', line 69 def to_binary() force_encoding 'ASCII-8BIT' if respond_to? :force_encoding return self end |
#to_text ⇒ Object
78 79 80 81 |
# File 'lib/pdfbeads.rb', line 78 def to_text() force_encoding 'UTF-8' if respond_to? :force_encoding return self end |