instance method
apply_mapping
Ruby on Rails 5.1.7
Since v5.1.7 Last seen in v5.2.8.1 Private — implementation detail, not part of the public APIAvailable in: v5.1.7 v5.2.8.1
Signature
apply_mapping(string, mapping)
No documentation comment.
Parameters
-
stringreq -
mappingreq
Source
# File activesupport/lib/active_support/multibyte/unicode.rb, line 371
def apply_mapping(string, mapping)
database.codepoints
string.each_codepoint.map do |codepoint|
cp = database.codepoints[codepoint]
if cp && (ncp = cp.send(mapping)) && ncp > 0
ncp
else
codepoint
end
end.pack("U*")
end
Defined in activesupport/lib/active_support/multibyte/unicode.rb line 371
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Unicode