return object as string
each data value separated by coma

@param string $separator
@return string
166229
public function toString($separator = null)
    {
        if (!is_null($separator)) {
            $this->_separator = $separator;
        }

        $this->_prepareData();
        return $this->__toString();
    }
90635
public function getTree(string $separator = '/')
    {
        $tree = '';

        $current = $this;
        do {
            $tree    = $current->getSlug().$separator.$tree;
            $current = $current->getParent();
        } while ($current);

        return trim($tree, $separator);
    }
852739
protected function parseAsMultiple($value, $separator = ',')
    {
        if (is_array($value) || $value instanceof Traversable) {
            $parsed = [];
            foreach ($value as $val) {
                if (empty($val) && !is_numeric($val)) {
                    continue;
                }

                $parsed[] = $val;
            }

            return $parsed;
        }

        if ($separator instanceof PropertyInterface) {
            $separator = $separator->multipleSeparator();
        }

        if (is_object($value) && method_exists($value, '__toString')) {
            $value = strval($value);
        }

        if (empty($value) && !is_numeric($value)) {
            return [];
        }

        /**
         * This property is marked as "multiple".
         * Manually handling the resolution to array
         * until the property itself manages this.
         */
        if (is_string($value)) {
            return explode($separator, $value);
        }

        /**
         * If the parameter isn't an array yet,
         * means we might be dealing with an integer,
         * an empty string, or an object.
         */
        if (!is_array($value)) {
            return (array)$value;
        }

        return $value;
    }
1222763
public function getFulltextAddress($separator = "\n")
    {
        $elems = [];
        if ($this->address) {
            $elems[] = $this->address;
        }
        $zip_city = [];
        if ($this->zip) {
            $zip_city[] = $this->zip;
        }
        if ($this->city) {
            $zip_city[] = $this->city;
        }

        if ($zip_city) {
            $elems[] = implode(' ', $zip_city);
        }
        if ($this->country) {
            $elems[] = $this->country;
        }

        return implode($separator, $elems);
    }
884936
public static function getCamelCase($string, $separator = ' ')
    {
        if (empty($string)) {
            return '';
        }

        $effect = '';
        $members = explode($separator, $string);

        foreach ($members as $key => $value) {
            $value = mb_strtolower($value);

            if (0 === $key) {
                $effect .= self::lowercaseFirst($value);
            } else {
                $effect .= self::uppercaseFirst($value);
            }
        }

        return $effect;
    }
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;
    }
624635
public static function decodeArray(String $data, String $key = NULL, String $separator = NULL) : Array
    {
        return (array) self::decode($data, $key, $separator);
    }
647240
public function getDot(string $notation, string $separator = '.')
    {
        $args = explode($separator, $notation);

        if (count($args) == 0) {
            return null;
        }

        $last = array_pop($args);
        $pointer = &$this->data;

        foreach ($args as $step) {
            if (!isset($pointer[$step])) {
                return null;
            }

            $pointer = &$pointer[$step];
        }

        if (!isset($pointer[$last])) {
            return null;
        }

        return $pointer[$last];
    }
55189
public static function removeLast(string $string, string $separator): string
    {
        $string = explode($separator, $string);
        $string = Arr::removeLast($string);
        return implode($separator, $string);
    }
1101031
public function withSeparator(string $separator): self
    {
        if ($separator === $this->separator) {
            return $this;
        }

        $clone = clone $this;
        $clone->separator = $this->filterSeparator($separator);

        return $clone;
    }
371445
public static function getNonEmptyValuesAsString(array $values, $separator = ', ')
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($values)) {
            return null;
        }

        $nonEmpty = self::getNonEmptyValues($values);

        /*
         * No values?
         * Nothing to do
         */
        if (empty($nonEmpty)) {
            return '';
        }

        return implode($separator, $nonEmpty);
    }
349929
public function getCsvString($separator, CsvFile $csv_file = null)
	{
		$csv_file = $csv_file ? $csv_file : $this->csv_file;
		$csv = '';
		if( ! isset($csv_file) )
		{
			throw new NoDataException;
		}
		else
		{
			foreach($csv_file as $key => $csv_line)
			{
				if($key == 0)
				{
					$csv.=$csv_line->getCsvHeader($separator);
				}
				$csv.=$csv_line->getCsvString($separator);
			}
		}

		return $csv;
	}
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));
    }
881878
public function toSlug(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 = htmlentities($string, ENT_QUOTES, 'UTF-8');
        $string = preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', $string);
        $string = iconv('utf-8', 'ASCII//TRANSLIT//IGNORE', $string);
        $string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
        $string = preg_replace('~[^0-9a-z]+~i', $separator, $string);
        $string = trim($string, $separator);
        $string = mb_strtolower($string);

        return new static($string, $this->encoding);
    }
755104
public static String mkString(@javax.annotation.Nonnull final String separator, final String... strs) {
    return Arrays.asList(strs).stream().collect(Collectors.joining(separator));
  }
639374
public function getListeBase($separator)
    {
        $all_coll = $this->getAllColl();
        $liste = '';
        foreach ($all_coll as $sbas => $info) {
            $liste .= phrasea::sbas_labels($sbas, $this->app) . ' ' . $separator . ' ';
        }

        return $liste;
    }
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));
    }