Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Helper.php « lib - github.com/nextcloud/bookmarks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f55cdb3ee2f9b7a44633939ab8a4f9e1f4f82411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/*
 * Copyright (c) 2020. The Nextcloud Bookmarks contributors.
 *
 * This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */

namespace OCA\Bookmarks;

class Helper {
	public static function getDomainWithoutExt($name) {
		$pos = strrpos($name, '.');
		if ($pos === false) {
			return $name;
		}

		return substr($name, 0, $pos);
	}
}