instance method
apply_mapping
Ruby on Rails 5.2.8.1
Since v5.2.8.1 Last seen in v5.2.8.1 PrivateSignature
apply_mapping(string, mapping)
No documentation comment.
Parameters
-
stringreq -
mappingreq
Source
# File activesupport/lib/active_support/multibyte/unicode.rb, line 373
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 373
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Unicode