Use the delimiter from the setting and make a list of words.

@param string $string The list of words as a single string.

@return array The list of word split on the delimiter.
351883
private function getWords($string)
    {
        $delimiter = $this->get('delimiter');
        if (empty($delimiter)) {
            $delimiter = ' ';
        }

        return trimsplit($delimiter, $string);
    }
636221
public static function stringSplit($string, $chunkLength=0, $charset='UTF-8')
    {

        if ($chunkLength < 1) {
            return preg_split("//u", $string, -1, PREG_SPLIT_NO_EMPTY);
        }


        $split = [];

        $len = mb_strlen($string, $charset);

        for ($i = 0; $i < $len; $i += $chunkLength) {
            $split[] = mb_substr($string, $i, $chunkLength, $charset);
        }

        return $split;

    }
973185
public static function underscore($string = null)
    {
        return implode(static::SEPARATOR_UNDERSCORE, array_map(function ($word) {
            return strtolower($word);
        }, preg_split('/([A-Z]*[^A-Z]+)/', static::clear($string), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY)));
    }
23537
public function loadString(&$string): array
    {
        /** @noinspection CallableParameterUseCaseInTypeContextInspection */
        $string = $this->unwrap($string);
        $this->rawSegments = $string;

        return $this->parse($string);
    }
1286526
private static function multilineQuote($string)
    {
        $lines = \explode("\n", $string);
        $last = \count($lines) - 1;

        foreach ($lines as $k => $line) {
            if ($k === $last) {
                $lines[$k] = self::convertString($line);
            } else {
                $lines[$k] = self::convertString($line . "\n");
            }
        }

        return $lines;
    }
955914
public function parse($string)
    {
        global $matchedNotes;

        $keyPrefixLen = $this->keyPrefix ? strlen($this->keyPrefix) : 0;
        
        $data = array();
        $toDelete = [];
        $lines = preg_split('@\n@', $string, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE);

        foreach ($lines as list($l, $offset)) {
            $len = strlen($l);
            $l = trim($l);
            $offset += $len - strlen($l);

            if ($l && $l[0] == '@') {
                $curDelete = trim($l);
                $l = substr($l, 1);
                $d = preg_split('/\s+/', $l, 2, PREG_SPLIT_OFFSET_CAPTURE);
                
                $key = $d[0][0];
                if ($this->keyPrefix) {
                    if (strpos($key, $this->keyPrefix)!==0)
                        continue;
                    $key = substr($key, $keyPrefixLen);
                }
                
                $key = preg_split(
                    "/(
                           \]\[
                        |  \[
                        |  \]\.   # when php style abuts dot notation (foo[a].b)
                        |  \]
                        |  \.)
                    /x", 
                    rtrim($key, ']')
                );
                
                if (isset($d[1])) {
                    $value = $d[1][0];
                }
                else {
                    $value = $this->defaultValue;
                }
                
                $current = &$data;
                $found = array();
                foreach ($key as $part) {
                    if ($current && !is_array($current)) {
                        throw new RewriteException("Key at path ".implode('.', $found)." already had non-array value, tried to set key $part");
                    }

                    if (!$found) {
                        if (in_array($part, $matchedNotes)) {
                            $toDelete[] = $curDelete;
                        }
                    }
                    
                    $found[] = $part;
                    
                    // if the last segment is empty, it means "@key[] value" or "@key. value" was used,
                    //  so we should just assign the next key
                    if ($part !== "")
                        $current = &$current[$part];
                    else
                        $current = &$current[];
                }
                
                if ($current === null)
                    $current = $value;
                elseif (!is_array($current))
                    $current = array($current, $value);
                else
                    $current[] = $value;
                
                unset($current);
            }
        }
        return [$data, $toDelete];
    }
692298
private function parse_result($string)
    {
        $array1 = explode(PHP_EOL, trim($string));
        $result = array();
        foreach ($array1 as $key => $value) {
            $array2 = explode(':', $value);
            $result[ $array2[0] ] = trim($array2[1]);
        }

        return $result;
    }
1284891
public function chars($string, $chars = 80, $elide = '...', $splitBy = ' ')
    {
        if (mb_strlen($string) <= $chars) {
            return $string;
        }

        $words = explode($splitBy, $string);
        $newString = '';

        foreach ($words as $word) {
            if (mb_strlen("$newString $word") <= $chars) {
                $newString .= " $word";
            } else {
                break;
            }
        }

        return $newString.$elide;
    }
562016
public function parse(string $string)
    {
        $array = [];

        foreach ($this->splitItems($string) as $item) {
            $array[] = $this->splitItem($item);
        }

        return $array;
    }
1176130
public function parseString($string)
    {
        $tokens = new Stack($this->tokenizer->tokenize($string));

        if ($tokens[0]->type === Tokenizer::T_EOF) {
            return new CTX\AccountInfoList();
        }

        $ctx = new CTX();
        $this->reduceStruct($tokens, $ctx);

        return $ctx->accountInfoList[0];
    }
1339199
public function parseString($string)
    {
        $string = (string) $string;
        $string = preg_replace_callback("/\\$\{(.*?)\}/",
            function ($k) {
                return $this->get($k[1]);
            }, $string);

        return $string;
    }
963900
public function tokenize($string)
    {
        $line     = 1;
        $position = 1;
        $tokens   = array();

        while (strlen($string)) {
            foreach ($this->expressions as $rule) {
                if (!preg_match($rule['match'], $string, $match)) {
                    continue;
                }

                // Remove matched string from input
                $string = substr($string, strlen($match[0]));

                // Update position in file
                $line += substr_count($match[0], "\n");
                if (($pos = strrpos($match[0], "\n")) !== false) {
                    $position  = strrpos($match[0], "\n") + 1;
                } else {
                    $position += strlen($match[0]);
                }

                // Skip irrelevant rules
                if (in_array($rule['type'], $this->ignoreTokens)) {
                    continue 2;
                }

                // Add all other rules including their match to the token array
                $match = $this->removeNumericKeys($match);
                $tokens[] = new Token($rule['type'], $line, $position, $match);
                continue 2;
            }

            throw new \RuntimeException(
                "Could not parse string: '" . substr($string, 0, 20) . "' in line $line at position $position."
            );
        }

        $tokens[] = new Token(self::T_EOF, $line, $position, null);
        return $tokens;
    }
185419
private static function delimitString(string $string, string $delimiter): string
    {
        $output = [];

        if (preg_match('/\A[a-z0-9]+\z/ui', $string) && strtoupper($string) !== $string) {
            $parts = self::explodeOnCaps($string);
        } else {
            $parts = self::explodeOnDelims($string);
        }

        foreach ($parts as $part) {
            $output[] = $part.$delimiter;
        }

        return rtrim(implode('', $output), $delimiter);
    }
283855
private function explode($string, $delimiter)
    {
        $result = [];
        while (($pos = strrpos($string, $delimiter)) !== false) {
            $result[] = ($string = substr($string, 0, $pos));
        }
        return $result;
    }
1033430
private String [] split (final String string, final String delim)
  {
    final List <String> result = new ArrayList <> ();

    final StringTokenizer stringTokenizer = new StringTokenizer (string, delim);
    while (stringTokenizer.hasMoreTokens ())
    {
      result.add (stringTokenizer.nextToken ());
    }

    return result.toArray (new String [result.size ()]);
  }
457253
public static function csplit($string, $delimiter = ',')
    {
        if (is_array($string)) {
            return $string;
        }
        $res = [];
        foreach (explode($delimiter, $string) as $k => $v) {
            $v = trim($v);
            if (strlen($v)) {
                array_push($res, $v);
            }
        }

        return $res;
    }
135611
public function wordWrap($string)
    {
        return wordwrap($string, $this->line_length, $this->break_string, $this->split_mid_word);
    }