public static function format($string, $format, $separator = '/')
	{
		// Trim
		$string = trim($string, $separator);
		
		// Empty path case
		if ($string === '') {
			if ($format == self::FORMAT_BOTH_DELIMITERS) {
				return $separator;
			} else {
				return $string;
			}
		}
		
		// Add delimiters
		if ($format & self::FORMAT_LEFT_DELIMITER) {
			$string = $separator . $string;
		}
		if ($format & self::FORMAT_RIGHT_DELIMITER) {
			$string = $string . $separator;
		}
		
		return $string;
	}