parameters: (string)
return_statement: return False
docstring: Returns True if |string| is in its canonical integer form.
  
    The canonical form is such that str(int(string)) == string.
docstring_summary: Returns True if |string| is in its canonical integer form.
docstring_tokens: Returns True if |string| is in its canonical integer form .
function: def IsStrCanonicalInt(string):
    """Returns True if |string| is in its canonical integer form.
  
    The canonical form is such that str(int(string)) == string.
    """
    if type(string) is str:
      # This function is called a lot so for maximum performance, avoid
      # involving regexps which would otherwise make the code much
      # shorter. Regexps would need twice the time of this function.
      if string:
        if string == "0":
          return True
        if string[0] == "-":
          string = string[1:]
          if not string:
            return False
        if '1' <= string[0] <= '9':
          return string.isdigit()
  
    return False
function_tokens: def IsStrCanonicalInt ( string ) : if type ( string ) is str : # This function is called a lot so for maximum performance, avoid # involving regexps which would otherwise make the code much # shorter. Regexps would need twice the time of this function. if string : if string == "0" : return True if string [ 0 ] == "-" : string = string [ 1 : ] if not string : return False if '1' <= string [ 0 ] <= '9' : return string . isdigit ( ) return False