Add 'soft hyphens' to a string, so that it won't break layout in HTML when
using strings without spaces or dashes. Only breaks in long (> 19 chars) words.
public static shyphenate ( string $str ) : string | ||
$str | string | |
return | string |
/** * Add 'soft hyphens' ­ to a string, so that it won't break layout in HTML when * using strings without spaces or dashes. * * @param string $str * * @return string */ public function shy($str) { if (is_string($str)) { $str = Str::shyphenate($str); } return $str; }