parameters: (self,string)
return_statement: return string
docstring: Sets the string, to create the Robohash
docstring_summary: Sets the string, to create the Robohash
docstring_tokens: Sets the string to create the Robohash
function: def _remove_exts(self,string):
          """
          Sets the string, to create the Robohash
          """
  
          # If the user hasn't disabled it, we will detect image extensions, such as .png, .jpg, etc.
          # We'll remove them from the string before hashing.
          # This ensures that /Bear.png and /Bear.bmp will send back the same image, in different formats.
  
          if string.lower().endswith(('.png','.gif','.jpg','.bmp','.jpeg','.ppm','.datauri')):
              format = string[string.rfind('.') +1 :len(string)]
              if format.lower() == 'jpg':
                      format = 'jpeg'
              self.format = format
              string = string[0:string.rfind('.')]
          return string
function_tokens: def _remove_exts ( self , string ) : # If the user hasn't disabled it, we will detect image extensions, such as .png, .jpg, etc. # We'll remove them from the string before hashing. # This ensures that /Bear.png and /Bear.bmp will send back the same image, in different formats. if string . lower ( ) . endswith ( ( '.png' , '.gif' , '.jpg' , '.bmp' , '.jpeg' , '.ppm' , '.datauri' ) ) : format = string [ string . rfind ( '.' ) + 1 : len ( string ) ] if format . lower ( ) == 'jpg' : format = 'jpeg' self . format = format string = string [ 0 : string . rfind ( '.' ) ] return string