Changeset View
Changeset View
Standalone View
Standalone View
src/Strings/Multibyte/OmniString.php
Show All 14 Lines | class OmniString { | ||||
* @var string | * @var string | ||||
*/ | */ | ||||
private $value; | private $value; | ||||
/// | /// | ||||
/// Constructor | /// Constructor | ||||
/// | /// | ||||
public function __construct (string $value = '', ?string $encoding = null) { | public function __construct (string $value = '', string $encoding = '') { | ||||
$this->value = $value; | $this->value = $value; | ||||
$this->setEncoding($encoding ?? "UTF-8"); | $this->setEncoding($encoding ?: "UTF-8"); | ||||
} | } | ||||
/// | /// | ||||
/// Magic methods | /// Magic methods | ||||
/// | /// | ||||
public function __toString() : string { | public function __toString() : string { | ||||
return $this->value; | return $this->value; | ||||
Show All 35 Lines |
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator