Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Get part of string
<?php mb_substr(    string $string,    int $start,    ?int $length = null,    ?string $encoding = null): string
<?php                             if ($this->getLength($currentLine) < $max) {

                                $currentLine .= strings(self::$space)->repeat($max - $this->getLength($currentLine))->toString();

                            } else if ($this->getLength($currentLine) > $max) {

                                $currentLine = mb_substr($currentLine, 0, - ($this->getLength($currentLine) - $max));

                            }

                        }