Class: StringScanner

Inherits:
Object
  • Object
show all
Defined in:
lib/utf8/string_scanner.rb

Direct Known Subclasses

UTF8

Defined Under Namespace

Classes: UTF8

Instance Method Summary collapse

Instance Method Details

#as_utf8Object

Returns an UTF8-aware version of StringScanner wrapping your original string

NOTE: this will lose all state associated with the current StringScanner instance (like the current scan position)



8
9
10
# File 'lib/utf8/string_scanner.rb', line 8

def as_utf8
  StringScanner::UTF8.new(self.string.as_utf8)
end