src/mako/cli/output/helpers/Alert.php
protected function wordWrap(string $string, int $width): string
	{
		return trim(preg_replace(sprintf('/(.{1,%1$u})(?:\s|$)|(.{%1$u})/uS', $width), '$1$2' . PHP_EOL, $string));
	}
protected function wordWrap(string $string, int $width): string
	{
		return trim(preg_replace(sprintf('/(.{1,%1$u})(?:\s|$)|(.{%1$u})/uS', $width), '$1$2' . PHP_EOL, $string));
	}
protected function wordWrap ( string $ string , int $ width ) : string { return trim ( preg_replace ( sprintf ( '/(.{1,%1$u})(?:\s|$)|(.{%1$u})/uS' , $ width ) , '$1$2' . PHP_EOL , $ string ) ) ; }
Wraps a string to a given number of characters.

@param  string $string String
@param  int    $width  Max line width
@return string
Wraps a string to a given number of characters .