instance method next_state

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

next_state(c)

No documentation comment.

Parameters

c req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb, line 42
    def next_state(c)
      # for each byte we get its class
      # if it is first byte, we also get byte length
      byteCls = @_mModel['classTable'][c[0]]
      if @_mCurrentState == EStart
        @_mCurrentBytePos = 0
        @_mCurrentCharLen = @_mModel['charLenTable'][byteCls]
      end
      # from byte's class and stateTable, we get its next state
      @_mCurrentState = @_mModel['stateTable'][@_mCurrentState * @_mModel['classFactor'] + byteCls]
      @_mCurrentBytePos += 1
      return @_mCurrentState
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb line 42 · View on GitHub · Improve this page · Find usages on GitHub

Defined in CharDet::CodingStateMachine

Type at least 2 characters to search.

↑↓ navigate · open · esc close