shyphenate() public static method

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
示例#1
0
 /**
  * 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;
 }