original_string: private function buildRootPath()
      {
          // In Windows script path uses backslash, convert it:
          $scriptPath = str_replace('\\', '/', $_SERVER['PHP_SELF']);
          $rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));
  
          return $rootPath;
      }
code: private function buildRootPath()
      {
          // In Windows script path uses backslash, convert it:
          $scriptPath = str_replace('\\', '/', $_SERVER['PHP_SELF']);
          $rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));
  
          return $rootPath;
      }
code_tokens: private function buildRootPath ( ) { // In Windows script path uses backslash, convert it: $ scriptPath = str_replace ( '\\' , '/' , $ _SERVER [ 'PHP_SELF' ] ) ; $ rootPath = str_replace ( ' ' , '%20' , rtrim ( substr ( $ scriptPath , 0 , strpos ( $ scriptPath , 'index.php' ) ) , '/' ) ) ; return $ rootPath ; }
docstring: Get the Grav Root Path
  
  @return string
docstring_tokens: Get the Grav Root Path