<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mobitan</author_name>
  <author_url>https://blog.hatena.ne.jp/mobitan/</author_url>
  <blog_title>Wisteria::Diary</blog_title>
  <blog_url>https://mobitan.hateblo.jp/</blog_url>
  <categories>
    <anon>ソフト</anon>
  </categories>
  <description>書いてみたけど正規表現で str.replace(/^\s+|\s+$/g, &quot;&quot;) した方が速いのでお蔵入り。 function trim(str) { var b = 0; var d = str.length; while (b &lt; d &amp;&amp; str.charCodeAt(b) &lt;= 0x20) b++; while (b &lt; d &amp;&amp; str.charCodeAt(d - 1) &lt;= 0x20) d--; return str.substring(b, d); } ロジック自体は java.lang.String の trim() をパクったのでバグはないはず…。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmobitan.hateblo.jp%2Fentry%2F20101014%2F1287046445&quot; title=&quot; Javascript で正規表現を使わない trim() - Wisteria::Diary&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>2010-10-14 17:54:05</published>
  <title> Javascript で正規表現を使わない trim()</title>
  <type>rich</type>
  <url>https://mobitan.hateblo.jp/entry/20101014/1287046445</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
