<?php

namespace Opentalent\OtCore\Utility;

class RouteNormalizer
{
    public static function normalizeSlug(string $slug) {
        return '/' . trim($slug, '/');
    }

    public static function normalizeDomain(string $domain) {
        return preg_replace('/https?:\/\/([\w\.]+)(?:\/.*)?/', '$1', $domain);
    }
}
