src/Valkyrja/Path/NativePathParser.php
protected function splitSegmentsDeliminator(array &$segments, string $segment, string $deliminator): void
    {
        // Split the segment on that bracket
        $parts = explode($deliminator, $segment);

        // Iterate through the parts
        foreach ($parts as $part) {
            if (! $part) {
                continue;
            }

            // If the segment has the deliminator
            if (strpos($part, $deliminator) !== false) {
                $this->splitSegmentsDeliminator($segments, $part, $deliminator);

                continue;
            }

            // Setting each part individually
            $segments[] = $part;
        }
    }
protected function splitSegmentsDeliminator(array &$segments, string $segment, string $deliminator): void
    {
        // Split the segment on that bracket
        $parts = explode($deliminator, $segment);

        // Iterate through the parts
        foreach ($parts as $part) {
            if (! $part) {
                continue;
            }

            // If the segment has the deliminator
            if (strpos($part, $deliminator) !== false) {
                $this->splitSegmentsDeliminator($segments, $part, $deliminator);

                continue;
            }

            // Setting each part individually
            $segments[] = $part;
        }
    }
Split a segment by deliminator (recursive).

@param array  $segments    The segments
@param string $segment     The segment
@param string $deliminator The deliminator

@return void