original_string: public static function pathPrefixedByLangCode($string)
      {
          if (strlen($string) <= 3) {
              return false;
          }
  
          $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []);
          $parts = explode('/', trim($string, '/'));
  
          if (count($parts) > 0 && in_array($parts[0], $languages_enabled)) {
              return true;
          }
  
          return false;
      }
code: public static function pathPrefixedByLangCode($string)
      {
          if (strlen($string) <= 3) {
              return false;
          }
  
          $languages_enabled = Grav::instance()['config']->get('system.languages.supported', []);
          $parts = explode('/', trim($string, '/'));
  
          if (count($parts) > 0 && in_array($parts[0], $languages_enabled)) {
              return true;
          }
  
          return false;
      }
code_tokens: public static function pathPrefixedByLangCode ( $ string ) { if ( strlen ( $ string ) <= 3 ) { return false ; } $ languages_enabled = Grav :: instance ( ) [ 'config' ] -> get ( 'system.languages.supported' , [ ] ) ; $ parts = explode ( '/' , trim ( $ string , '/' ) ) ; if ( count ( $ parts ) > 0 && in_array ( $ parts [ 0 ] , $ languages_enabled ) ) { return true ; } return false ; }
docstring: Checks if the passed path contains the language code prefix
  
  @param string $string The path
  
  @return bool
docstring_tokens: Checks if the passed path contains the language code prefix