Example #1
0
/**
 * Converts a string variable to an instance of `PowerString`.
 * @param string $str Variable.
 * @return PowerString
 */
function toPS(&$str)
{
    return PowerString::cast($str);
}
Example #2
0
 /**
  * Join array elements with a string.
  *
  * @param string $glue
  * @return PowerString
  */
 function join($glue = '')
 {
     return PowerString::of(implode($glue, $this->A));
 }