original_string: public function removeTrainingSlash($url)
      {
          if (null === $url || strlen($url) <= 2) {
              return $url;
          }
  
          return (substr($url, -1, 1) == '/')? substr($url, 0, -1) : $url;
      }
code: public function removeTrainingSlash($url)
      {
          if (null === $url || strlen($url) <= 2) {
              return $url;
          }
  
          return (substr($url, -1, 1) == '/')? substr($url, 0, -1) : $url;
      }
code_tokens: public function removeTrainingSlash ( $ url ) { if ( null === $ url || strlen ( $ url ) <= 2 ) { return $ url ; } return ( substr ( $ url , - 1 , 1 ) == '/' ) ? substr ( $ url , 0 , - 1 ) : $ url ; }
docstring: Removes a trailing slash from an url string.
  
  @param string $url
  @return string
docstring_tokens: Removes a trailing slash from an url string .