<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nainaistar</author_name>
  <author_url>https://blog.hatena.ne.jp/nainaistar/</author_url>
  <blog_title>きり丸の技術日記</blog_title>
  <blog_url>https://nainaistar.hatenablog.com/</blog_url>
  <categories>
    <anon>Javascript</anon>
    <anon>技術</anon>
  </categories>
  <description>小ネタ。 JavaScript（ECMAScript）、TypeScriptで文字列型（String型）から数値型（number型）に変換しようとしましたが、小数点セパレータが国によって違うため、微妙にハマったのでメモします。 なお、きれいな処理だとは思っていないので、もしよりよい表現があれば教えていただきたいです。 環境 Node.js v14.17.6 ゴール 文字列から数値に変換する 文字列「-123,456,789円」を数値の「-123456789」に変換する 日本のセパレータに合わせる 今回ハマったのが、カンマで3桁ごとに区切られた文字列を数値変換できなかったのがきっかけです。 です…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnainaistar.hatenablog.com%2Fentry%2F2021%2F09%2F24%2F120000&quot; title=&quot;JSで文字列から数値に変換する（カンマで3桁ごとに区切られた文字列を数値に変換する） - きり丸の技術日記&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>https://cdn-ak.f.st-hatena.com/images/fotolife/n/nainaistar/20210922/20210922145948.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-09-24 12:00:00</published>
  <title>JSで文字列から数値に変換する（カンマで3桁ごとに区切られた文字列を数値に変換する）</title>
  <type>rich</type>
  <url>https://nainaistar.hatenablog.com/entry/2021/09/24/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
