@param string $separator
@param int    $mode

@return string[] E.g. for ", " $separator
[
"12831283123123" => "test@example.com, test_alias@example.com",
"1045618888777" => "test2@example.com"
]
332165
public function resolveUserIdToInboxesArray(string $separator, int $mode)
    {
        $return = [];
        foreach ($this->resolveUserIds() as $userId) {
            $return[$userId] = implode($separator, $this->resolveEmailsFromUserId($userId, $mode));
        }

        return $return;
    }
822679
public function getDot($notation, $separator = '.')
    {
        Argument::i()
            //argument 1 must be a string
            ->test(1, 'string')
            //argument 2 must be a string
            ->test(2, 'string');

        $args = explode($separator, $notation);
        
        return call_user_func_array(array($this, 'get'), $args);
    }
489460
public function getHref($index=null, $separator="/") {
		if (!isset($index)) {
			$index=sizeof($this->content);
		}
		if ($this->absolutePaths === true) {
			return $this->_hrefFunction($this->content[$index]);
		} else {
			return $this->root . implode($separator, array_slice(array_map(function ($e) {
				return $this->_hrefFunction($e);
			}, $this->content), $this->startIndex, $index + 1));
		}
	}
247860
public function getTitle($separator = null)
    {
        if ($title_set = parent::getTitle($separator)) {
            return $title_set;
        }

        $title = array();
        foreach($this->menu->getActivePath($this->getRequest()) as $menuItem) {
            $title[] = $menuItem->get('label');
        }
        if ($id = $this->getInstanceId()) {
            $title[] = $id;
        }

        return implode($separator, $title);
    }
166229
public function toString($separator = null)
    {
        if (!is_null($separator)) {
            $this->_separator = $separator;
        }

        $this->_prepareData();
        return $this->__toString();
    }
477627
public function getJoinedMessage($separator = "\n")
    {
        $messages = $this->getDetailMessages();
        $array = array();
        foreach ($messages as $rules) {
            foreach ($rules as $options) {
                foreach ($options as $message) {
                    $array[] = $message;
                }
            }
        }
        return implode($separator, array_unique($array));
    }
519536
private function renderTitleLast($separator)
    {
        $output = [];

        if ($this->hasSiteName()) {
            $output[] = $this->getSiteName();
            $output[] = $separator;
        }

        $output[] = $this->getTitleOnly();

        return implode('', $output);
    }
723964
public function toArray(int $mode = self::ARRAY_ASSOC): array
    {
        switch ($mode) {
            case self::ARRAY_MULTI_PART:
                $caseHelper = CaseHelperFactory::make(CaseHelperFactory::INPUT_TYPE_CAMEL_CASE);
                $keyVals = $this->toArray(self::ARRAY_ASSOC);
                $multiPart = [];

                foreach ($keyVals as $key => $val) {
                    $multiPart[] = ['name' => $caseHelper->toSnakeCase($key), 'contents' => "$val"];
                }

                $array = $multiPart;
                break;
            default:
                $array = array_filter((array)$this); // removes empty values
                break;
        }

        return $array;
    }
948387
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;
	}
523322
protected function makeParametersDDL($separator = " ")
    {
        $params = [];

        foreach ($this->parameters as $parameter) {
            $params[] = $parameter->getDDL();
        }

        return implode(',' . $separator, $params);
    }
425121
protected function getLdapFilterForAliases()
    {
        $filters = [];

        foreach (array_keys($this->aliases) as $alias) {
            $filters[] = $this->getLdapFilter($alias);
        }

        if (count($filters) == 1) {
            return $filters[0];
        } else {
            return bOr::SEPARATOR_START.bOr::SYMBOL.implode('', $filters).bOr::SEPARATOR_END;
        }
    }
1280321
public static function substringAfter($string, $separator)
    {
        $pos = mb_strpos($string, $separator);
        if ($pos === false) {
            return $string;
        }
        return mb_substr($string, $pos + 1, mb_strlen($string));
    }
335994
public static function identifier(string $name, string $separator = '_'): string {
    $slugify    = new Slugify(['separator' => $separator]);
    $identifier = $slugify->slugify($name);

    return $identifier;
  }
886605
public static function getLastElementOfString($string, $separator)
    {
        $elements = self::getStringElements($string, $separator);

        /*
         * No elements?
         * Nothing to do
         */
        if (empty($elements)) {
            return null;
        }

        $element = Arrays::getLastElement($elements);

        return trim($element);
    }
1337647
public static function str2array($str, $sep = ',')
    {
        $str = trim($str, "$sep ");

        if (!$str) {
            return [];
        }

        return preg_split("/\s*$sep\s*/", $str, -1, PREG_SPLIT_NO_EMPTY);
    }
1120414
protected function explodeList($value, $separator = null)
    {
        if (is_array($value)) {
            return $value;
        }

        if ($value === '' || !is_string($value)) {
            return array();
        }

        if (!isset($separator)) {
            $separator = $this->config->get('module_cli_list_separator', '|');
        }

        return array_map('trim', explode($separator, $value));
    }
328238
public function getBreadcrumbs($separator=' &raquo; ') {
        $crumbs=array();
        $ancestors=array_reverse($this->owner->getAncestors()->toArray());
        foreach($ancestors as $ancestor) $crumbs[]=$ancestor->Title;
        $crumbs[]=$this->owner->Title;
        return implode($separator, $crumbs);
    }