Automattic\WooCommerce\Vendor\Sabberworm\CSS\Value
Size::render
Method of the class: Size{}
No Hooks.
Returns
String.
Usage
$Size = new Size(); $Size->render( $oOutputFormat );
- $oOutputFormat(OutputFormat|null) (required)
- .
Size::render() Size::render code WC 10.4.3
public function render($oOutputFormat)
{
$l = localeconv();
$sPoint = preg_quote($l['decimal_point'], '/');
$sSize = preg_match("/[\d\.]+e[+-]?\d+/i", (string)$this->fSize)
? preg_replace("/$sPoint?0+$/", "", sprintf("%f", $this->fSize)) : (string)$this->fSize;
return preg_replace(["/$sPoint/", "/^(-?)0\./"], ['.', '$1.'], $sSize)
. ($this->sUnit === null ? '' : $this->sUnit);
}