<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>white-lilium</author_name>
  <author_url>https://blog.hatena.ne.jp/white-lilium/</author_url>
  <blog_title>プログラミングノート</blog_title>
  <blog_url>https://homework.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>表示枠からはみ出した文字列を省略して表示します。文字列は全角文字と半角文字が混在しているとします。 （たまに同じような処理を書きますが、いつもいつも忘れてしまいます。今回はメモを残します。） １．使用するPHPのマルチバイト文字列関数 下の２つの関数のパラメータで、エンコーディングを指定することが大切です。 ▼mb_strwidth 「文字列 str の幅を返します。マルチバイト文字は、通常はシングルバイト文字の倍の幅となります。」（PHP: mb_strwidth - Manual より引用） ▼mb_substr 「文字数に基づきマルチバイト対応の substr() 処理を行います。位置は…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhomework.hatenablog.jp%2Fentry%2F2017%2F03%2F25%2F171714&quot; title=&quot;PHP CSS　表示枠からはみ出した文字列を省略して表示する - プログラミングノート&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>2017-03-25 17:17:14</published>
  <title>PHP CSS　表示枠からはみ出した文字列を省略して表示する</title>
  <type>rich</type>
  <url>https://homework.hatenablog.jp/entry/2017/03/25/171714</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
