Files
pterodactyl-panel/app/Support/DatabaseName.php
T

14 lines
284 B
PHP
Raw Normal View History

2026-10-05 18:10:18 -04:00
<?php
declare(strict_types=1);
namespace Pterodactyl\Support;
final class DatabaseName
{
public static function generateUnique(string $name, int $serverId): string
{
return sprintf('s%d_%s', $serverId, mb_substr($name, 0, 48 - mb_strlen("s{$serverId}_")));
}
}