<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tomcky</author_name>
  <author_url>https://blog.hatena.ne.jp/tomcky/</author_url>
  <blog_title>Tomcky's blog</blog_title>
  <blog_url>https://tomcky.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Twig</anon>
  </categories>
  <description>twig.symfony.com デフォルトでは空白が取り除かれるが、削除したい文字を引数に渡すことができる。 これを使えばゼロ埋め数値のゼロを取り除くことも簡単。 {{ '003210'|trim('0', 'left') }} {# 結果：3210 #} ここで注意したいのは第二引数に 'left' を渡すこと。 でないと数値部分のゼロまで取り除かれてしまう。 {{ '003210'|trim('0') }} {# 結果：321 #} ちなみに、PHPの trim や ltrim でも同様のことが可能。 https://www.php.net/manual/ja/function.trim…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftomcky.hatenadiary.jp%2Fentry%2F20200316%2F1584365108&quot; title=&quot;【Twig】ゼロ埋め数値のゼロ取りたいならtrim使うといい - Tomcky&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-03-16 22:25:08</published>
  <title>【Twig】ゼロ埋め数値のゼロ取りたいならtrim使うといい</title>
  <type>rich</type>
  <url>https://tomcky.hatenadiary.jp/entry/20200316/1584365108</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
