Creates the string representation

@param string $delimiter
@return string
179774
public function toString($delimiter = ' ') {
        $queryFieldString = '';

        foreach ($this->queryFields as $fieldName => $fieldBoost) {
            $queryFieldString .= $fieldName;

            if ($fieldBoost != 1.0) {
                $queryFieldString .= '^' . number_format($fieldBoost, 1, '.', '');
            }

            $queryFieldString .= $delimiter;
        }

        return rtrim($queryFieldString, $delimiter);
    }
1124471
public static function toCamelCase(string $input, string $delimiter = '_'): string
    {
        $str = [];

        foreach (explode($delimiter, $input) as $v) {
            $str[] = ucfirst($v);
        }

        return implode('', $str);
    }
497439
protected static function stringToArray(
        string $delimiter,
        int $limit = PHP_INT_MAX,
        RuleInterface $next = null
    ): RuleInterface {
        return $next === null ?
            new StringToArray($delimiter, $limit) : new AndOperator(new StringToArray($delimiter, $limit), $next);
    }
159779
public static function stringToArray($string = false, $delimiter = ' ', $limit = false) {

        if ($string && Validate::isString($string)) {

            if($limit) {

                return explode($delimiter, $string, $limit);
            }

            return explode($delimiter, $string);
        }

        return false;
    }
1061286
public function encode($data, $delimiter = null): string
    {
        if (count($data) === 0) {
            return '';
        }
        $delimiter = $delimiter ?? $this->getDelimiter();
        $header = array_keys(reset($data));

        // Encode the field names
        $string = implode($delimiter, $header). "\n";

        // Encode the data
        foreach ($data as $row) {
            $string .=  implode($delimiter, $row). "\n";
        }

        return $string;
    }
958395
public static function arrayToString(array $array, $delimiter = ""): string {
        $string = "";
        foreach ($array as $value) {
            if (\is_array($value)) {
                $string .= ArrayUtil::arrayToString($value, $delimiter) . $delimiter;
            } else {
                $string .= $value . $delimiter;
            }
        }
        return $string;
    }
660288
public static function toArray(string $string, string $delimiter = ','): array
    {
        $arrayTemp = explode($delimiter, $string);
        $array = [];
        foreach ($arrayTemp as $item) {
            $itemClear = trim($item);
            if ($itemClear) {
                $array[] = $itemClear;
            }
        }

        return $array;
    }
406830
public static function convertCamel($str, $separators = ['_', '-'], $delimiter = '')
	{
		$str = ucwords(str_replace($separators, ' ', $str));

		return str_replace(' ', $delimiter, $str);
	}
1338972
public static function slug(string $str, string $delimiter = '-') : string
    {
        $str = static::toAscii($str);

        // Remove all characters that are neither alphanumeric, nor the separator nor a whitespace.
        $str = preg_replace('![^'.preg_quote($delimiter).'\pL\pN\s]+!u', '', mb_strtolower($str));

        // Standardize the separator.
        $flip = $delimiter == '-' ? '_' : '-';
        $str = preg_replace('!['.preg_quote($flip).']+!u', $delimiter, $str);

        // Replace all separator characters and whitespace by a single separator.
        $str = preg_replace('!['.preg_quote($delimiter).'\s]+!u', $delimiter, $str);

        return trim($str, $delimiter);
    }
708136
public function toFlatArray($delimiter = self::DELIMITER) {
		$result = [];
		
		foreach ($this->_data as $key => $part) {
			if ($part instanceof Config) {
				foreach ($part->toFlatArray($delimiter) as $subkey => $subpart) {
					$result[$key . $delimiter . $subkey] = $subpart;
				}
			} else {
				$result[$key] = $part;
			}
		}
		
		return $result;
	}
1367178
protected function makeImplode($key, $delimiter)
    {
        $data = array_column($this->_map, $key);

        if (is_array($data)) {
            return implode($delimiter, $data);
        }

        return null;
    }
37921
public static function snake($str, $delimiter = '_')
    {
        $str = preg_replace('/([A-Z ])/', ' $1', $str);
        $str = preg_replace('/\s+/', $delimiter, trim($str));
        $str = strtolower($str);

        return $str;
    }
1059221
public static function camel2case($string, $delimiter = '_')
    {
        return ltrim(preg_replace_callback('/[A-Z]/', function ($mathes) use ($delimiter) {
            return $delimiter . strtolower($mathes[0]);
        }, $string), $delimiter);
    }
1306222
public static function slugify($str, $delimiter = '-')
    {
        $temp = preg_replace(
            '/[^a-z0-9]/',
            $delimiter,
            strtolower(trim(strip_tags($str)))
        );

        return preg_replace('/-{2,}/', $delimiter, $temp);
    }
207095
public static function explodeEscaped($delimiter, $string, $escapeChar = '\\')
    {
        $d = preg_quote($delimiter, "~");
        $e = preg_quote($escapeChar, "~");
        $tokens = preg_split(
            '~' . $e . '(' . $e . '|' . $d . ')(*SKIP)(*FAIL)|' . $d . '~',
            $string
        );
        return preg_replace(
            ['~' . $e . $e . '~', '~' . $e . $d . '~'],
            [$escapeChar, $delimiter],
            $tokens
        );
    }
552967
protected function _stringNode($delimiter = '', $heredoc = false)
    {
        $this->_codeNode();
        $token = $this->_stream->current(true);
        if (!$delimiter) {
            $this->_states['body'] = $token[1];
        } elseif ($delimiter === '"') {
            $this->_states['body'] = $token[1] . $this->_stream->next('"');
        } else {
            $this->_states['body'] = $token[1] . $this->_stream->nextSequence($delimiter);
        }
        if ($heredoc) {
            $this->_states['body'] .= $this->_stream->next([';']);
        }

        $node = new NodeDef($this->_states['body'], 'string');
        $this->_contextualize($node);
        return $node;
    }
303047
public function createWriter($filePath, $delimiter = WriterInterface::DELIMITER_DEFAULT, $fileCharset = WriterInterface::CHARSET_DEFAULT, $mode = 'w', $type = null)
    {
        if (null === $type) {
            $type = $this->getDefaultWriterType();
        }

        return $this->getWriterFactory()->createWriter($type, $filePath, $delimiter, $fileCharset, $mode);
    }