public function getContentSize($contentsWithPlaceholders)
    {
        $placeholderSize = $this->map(function ($value, $key) use (&$contentsWithPlaceholders){
            $count = substr_count($contentsWithPlaceholders, $key);

            return strlen($key) * $count - strlen($value) * $count;
        })->sum();

        return strlen($contentsWithPlaceholders) - $placeholderSize;
    }