original_string: function extract_action_and_args($string) {
  
      if ('' === $string) {
        return array('index', array(), NULL);
      }
  
      // find optional file extension
      $format = NULL;
      if (preg_match('/^(.*[^\/.])\.(\w+)$/', $string, $matches)) {
        list($_, $string, $format) = $matches;
      }
  
      // TODO this should possibly remove empty tokens
      $args = explode('/', $string);
      $action = array_shift($args);
      return array($action, $args, $format);
    }
code: function extract_action_and_args($string) {
  
      if ('' === $string) {
        return array('index', array(), NULL);
      }
  
      // find optional file extension
      $format = NULL;
      if (preg_match('/^(.*[^\/.])\.(\w+)$/', $string, $matches)) {
        list($_, $string, $format) = $matches;
      }
  
      // TODO this should possibly remove empty tokens
      $args = explode('/', $string);
      $action = array_shift($args);
      return array($action, $args, $format);
    }
code_tokens: function extract_action_and_args ( $ string ) { if ( '' === $ string ) { return array ( 'index' , array ( ) , NULL ) ; } // find optional file extension $ format = NULL ; if ( preg_match ( '/^(.*[^\/.])\.(\w+)$/' , $ string , $ matches ) ) { list ( $ _ , $ string , $ format ) = $ matches ; } // TODO this should possibly remove empty tokens $ args = explode ( '/' , $ string ) ; $ action = array_shift ( $ args ) ; return array ( $ action , $ args , $ format ) ; }
docstring: Extracts action and args from a string.
  
  @param  string       the processed string
  
  @return array        an array with two elements - a string containing the
  action and an array of strings representing the args
docstring_tokens: Extracts action and args from a string .