instance method
get_order
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
get_order(aStr)
No documentation comment.
Parameters
-
aStrreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb, line 186
def get_order(aStr)
return -1, 1 if not aStr
# find out current char's byte length
aStr = aStr[0..1].join if aStr.class == Array
if ((aStr[0..0] >= "\x81") and (aStr[0..0] <= "\x9F")) or ((aStr[0..0] >= "\xE0") and (aStr[0..0] <= "\xFC"))
charLen = 2
else
charLen = 1
end
# return its order if it is hiragana
if aStr.length > 1
if (aStr[0..0] == "\202") and (aStr[1..1] >= "\x9F") and (aStr[1..1] <= "\xF1")
return aStr[1] - 0x9F, charLen
end
end
return -1, charLen
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb line 186
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in CharDet::SJISContextAnalysis