instance method to_xs

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

to_xs()

XML escaped version of to_s

Source
# File activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb, line 110
  def to_xs
    unpack('U*').map {|n| n.xchr}.join # ASCII, UTF-8
  rescue
    unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252
  end

Defined in activesupport/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb line 110 · View on GitHub · Improve this page · Find usages on GitHub

Defined in String

Type at least 2 characters to search.

↑↓ navigate · open · esc close