<?php
namespace Root\Core\Helper;

class Path
{
    public static function normalize(string $path): string
    {
        return rtrim(str_replace(['\\', '//'], '/', $path), '/');
    }

    public static function join(string ...$segments): string
    {
        return self::normalize(implode('/', $segments));
    }
}
