Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-content/plugins/really-simple-ssl/core/app/Support/Utility/StringUtility.php
Назад
<?php declare(strict_types=1); namespace ReallySimplePlugins\RSS\Core\Support\Utility; /** * Utility class for String manipulation. */ class StringUtility { /** * Convert a URL to a title. * * Strips the site URL from the given URL, replaces dashes with spaces, * and capitalizes the first letter. */ public static function convertUrlToTitle(string $url): string { // Strip off the page url from the page name $site_url = trailingslashit(get_site_url()); $title = str_replace($site_url, '', $url); $title = str_replace('-', ' ', $title); // Enforce first letter uppercase return ucfirst($title); } /** * Convert a string from snake_case to PascalCase. */ public static function snakeToPascalCase(string $string): string { return str_replace('_', '', ucwords($string, '_')); } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка