instance method
feed
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
feed(aBuf)
No documentation comment.
Parameters
-
aBufreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb, line 49
def feed(aBuf)
aBuf.each_byte do |b|
c = b.chr
codingState = @_mCodingSM.next_state(c)
if codingState == EError
@_mState = ENotMe
break
elsif codingState == EItsMe
@_mState = EFoundIt
break
elsif codingState == EStart
if @_mCodingSM.get_current_charlen() >= 2
@_mNumOfMBChar += 1
end
end
end
if get_state() == EDetecting
if get_confidence() > SHORTCUT_THRESHOLD
@_mState = EFoundIt
end
end
return get_state()
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb line 49
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in CharDet::UTF8Prober