Retourne l'ann�e et mois format�s

@param integer $mmaaaa
@param string  $format
@param string  $separator default ' '

@return string
845
public static function getmoisanneemini($mmaaaa, $format = 'mm/aaaa', $separator = ' ')
    {
        $str = '';
        switch ($format) {
            case 'aaaamm':
                $str = self::getmoismini(substr($mmaaaa, 4, 2)) . $separator . substr($mmaaaa, 0, 4);
                break;
            case 'mmaaaa':
                $str = self::getmoismini(substr($mmaaaa, 0, 2)) . $separator . substr($mmaaaa, 2);
                break;
            case 'mm/aaaa':
                $date = explode('/', $mmaaaa);
                if ($date) {
                    $str = self::getmoismini($date[0]) . $separator . $date[1];
                }
                break;
        }
        
        return $str;
    }
162241
public static String format( Collection<String> items, String separator ) {

		StringBuilder sb = new StringBuilder();
		for( Iterator<String> it = items.iterator(); it.hasNext(); ) {
			sb.append( it.next());
			if( it.hasNext())
				sb.append( separator );
		}

		return sb.toString();
	}
360424
public function setSeparator($separator)
    {
        if (!in_array(
            $separator,
            [
                ' ',
                '-'
            ],
            true
        )
        ) {
            $separator = ' ';
        }

        $this->separator = $separator;

        return $this;
    }
857786
public function setQuerySeparator(string $separator)
    {
        $separator = filter_var($separator, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);

        $this->query_separator = trim($separator);
    }
470448
private function hostCalculation($format, $separator = '')
    {
        $network_quads = [
            sprintf("$format", $this->quads[0] & ~($this->subnet_mask >> 24)),
            sprintf("$format", $this->quads[1] & ~($this->subnet_mask >> 16)),
            sprintf("$format", $this->quads[2] & ~($this->subnet_mask >>  8)),
            sprintf("$format", $this->quads[3] & ~($this->subnet_mask >>  0)),
        ];

        return implode($separator, $network_quads);
    }
16700
public function format($format, array $arguments = array(), $glue = '<br>')
    {
        if (is_array($format)) {
            $format = implode($glue, gplcart_array_flatten($format));
        }

        return vsprintf($format, $arguments);
    }
550531
public function substringBeforeLast($separator)
    {
        if (($offset = $this->indexOfLast($separator)) === false) {
            return false;
        }

        return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding);
    }
678129
public function compile(string $separator = ""): string
    {
        // Boundaries
        $uniqueId = md5(uniqid(sprintf("%s-%s", $this->subject, microtime(false))));
        $boundaries[] = "--Comely_B1" . $uniqueId;
        $boundaries[] = "--Comely_B2" . $uniqueId;
        $boundaries[] = "--Comely_B3" . $uniqueId;

        // Headers
        $headers[] = $this->sender->name ?
            sprintf('From: %1$s <%2$s>', $this->sender->name, $this->sender->email) :
            sprintf('From:<%1$s>', $this->sender->email);
        $headers[] = sprintf('Subject: %1$s', $this->subject);
        $headers[] = "MIME-Version: 1.0";
        $headers[] = sprintf('X-Mailer: Comely %1$s', Comely::VERSION);
        $headers[] = sprintf('Content-Type: multipart/mixed; boundary="%1$s"', substr($boundaries[0], 2));
        foreach ($this->headers as $key => $value) {
            $headers[] = sprintf('%1$s: %2$s', $key, $value);
        }

        $headers[] = $separator; // Separator line between headers and body

        // Body
        $body[] = "This is a multi-part message in MIME format.";
        $body[] = $boundaries[0];
        $body[] = sprintf('Content-Type: multipart/alternative; boundary="%1$s"', substr($boundaries[1], 2));
        $body[] = ""; // Empty line

        // Body: text/plain
        if ($this->body->plain) {
            $encoding = $this->checkBodyEncoding($this->body->plain);
            $body[] = $boundaries[1];
            $body[] = sprintf('Content-Type: text/plain; charset=%1$s', $encoding[0]);
            $body[] = sprintf('Content-Transfer-Encoding: %1$s', $encoding[1]);
            $body[] = ""; // Empty line
            $body[] = $this->body->plain;
        }

        // Body: text/html
        if ($this->body->html) {
            $encoding = $this->checkBodyEncoding($this->body->html);
            $body[] = $boundaries[1];
            $body[] = sprintf('Content-Type: text/html; charset=%1$s', $encoding[0]);
            $body[] = sprintf('Content-Transfer-Encoding: %1$s', $encoding[1]);
            $body[] = ""; // Empty line
            $body[] = $this->body->html;
        }

        // Attachments
        foreach ($this->attachments as $attachment) {
            /** @var $attachment Attachment */
            $body[] = $boundaries[0];
            $body[] = implode($this->eol, $attachment->mime());
        }

        // Compile
        $mime = array_merge($headers, $body);
        return implode($this->eol, $mime);
    }
201681
public function join(array $array, string $separator = ','): string
    {
        $result = '';

        foreach ($array as $item) {
            if (is_array($item)) {
                $result .= $this->join($item, $separator) . $separator;
            } else {
                $result .= $item . $separator;
            }
        }

        $result = substr($result, 0, 0 - strlen($separator));

        return $result;
    }
286296
public static function getSizePattern($separator = ' x ')
    {
        $escapeMe = [
            '/',
            '|',
            '.',
            '(',
            ')',
            '[',
            ']',
        ];

        $cleanSeparator = trim($separator);

        if (in_array($cleanSeparator, $escapeMe, true)) {
            // I have to escape special character of  regular expression that may be used as separator
            $separator = str_replace($cleanSeparator, '\\' . $cleanSeparator, $separator);
        }

        return sprintf(self::$patterns['size'], $separator);
    }
1164553
public static function fromCamelCaseToLower($word, string $separator = '-'): string
    {
        $str = '';
        $active = false;
        $word = (string) $word;
        for ($i = 0; $i <= mb_strlen($word); $i++) {
            $char = mb_substr($word, $i, 1, self::ENCODING);
            $str .= ($active && $char >= 'A' && $char <= 'Z' ? $separator : '') . mb_strtolower($char);
            $active = $char !== ' ';
        }
        return $str;
    }
1363512
public function substringBeforeFirst($separator)
    {
        if (($offset = $this->indexOf($separator)) === false) {
            return false;
        }

        return static::create(mb_substr($this->str, 0, $offset, $this->encoding), $this->encoding);
    }
636169
public function calcMod10V1(string $number, string $separator = "", int $minimumLength = 6): string
    {
        $revstr = strrev((string) intval($number));
        $revstrLen = strlen($revstr);
        $total = 0;
        for ($i = 0; $i < $revstrLen; $i++) {
            if ($i % 2 == 0) {
                $multiplier = 2;
            } else {
                $multiplier = 1;
            }

            $subtotal = intval($revstr[$i]) * $multiplier;
            if ($subtotal >= 10) {
                $temp = (string) $subtotal;
                $subtotal = intval($temp[0]) + intval($temp[1]);
            }
            $total += $subtotal;
        }

        $checkDigit = (10 - ($total % 10)) % 10;
        $crn = str_pad(ltrim($number, "0"), $minimumLength - 1, "0", STR_PAD_LEFT) . $separator . $checkDigit;

        return $crn;
    }
1109515
public static function camelToSeparator(string $camelCaseString, string $separator = '_'): string
    {
        $separatedString = preg_replace('/([a-zA-Z])([A-Z])/', '$1' . $separator . '$2', $camelCaseString);
        $separatedString = preg_replace('/([A-Z0-9])([A-Z])/', '$1' . $separator . '$2', $separatedString);

        return strtolower($separatedString);
    }
394264
public static function camelCaseToSeparated($string, $separator = '-', $toLowerCase = true)
    {
        $separated = preg_replace(['/([a-z\d])([A-Z])/', '/([^' . preg_quote($separator) . '])([A-Z][a-z])/'], '$1' . $separator . '$2', $string);
        return $toLowerCase ? strtolower($separated) : $separated;
    }
146559
public function toSlugUtf8(string $separator = '-'): Utility
    {
        $string = mb_convert_encoding($this->string, 'UTF-8', $this->encoding);
        $string = preg_replace('/[^\s\p{L}0-9\-' . $separator . ']/u', '', $string);
        $string = preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', $string);
        $string = preg_replace('/[\s_\-]/', $separator, $string);
        $string = trim($string, $separator);
        $string = mb_strtolower($string, 'utf-8');
        return new static($string, $this->encoding);
    }
924035
public static function parse($path, $separator = self::SEPARATOR)
	{
		return $path != "" ? explode((string) $separator, (string) $path) : [];
	}