You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Stringy;
|
|
|
|
|
|
|
|
if (!function_exists('Stringy\create')) {
|
|
|
|
/**
|
|
|
|
* Creates a Stringy object and returns it on success.
|
|
|
|
*
|
|
|
|
* @param mixed $str Value to modify, after being cast to string
|
|
|
|
* @param string $encoding The character encoding
|
|
|
|
* @return Stringy A Stringy object
|
|
|
|
* @throws \InvalidArgumentException if an array or object without a
|
|
|
|
* __toString method is passed as the first argument
|
|
|
|
*/
|
|
|
|
function create($str, $encoding = null)
|
|
|
|
{
|
|
|
|
return new Stringy($str, $encoding);
|
|
|
|
}
|
|
|
|
}
|