parameters: (cls, s)
return_statement: return n
docstring: Convert a 4 character string to an integer.
docstring_summary: Convert a 4 character string to an integer.
docstring_tokens: Convert a 4 character string to an integer .
function: def str_to_int(cls, s):
          """ Convert a 4 character string to an integer. """
          if len(s) > 4:
              raise CompilerError('String longer than 4 characters')
          n = 0
          for c in reversed(s.ljust(4)):
              n <<= 8
              n += ord(c)
          return n
function_tokens: def str_to_int ( cls , s ) : if len ( s ) > 4 : raise CompilerError ( 'String longer than 4 characters' ) n = 0 for c in reversed ( s . ljust ( 4 ) ) : n <<= 8 n += ord ( c ) return n