<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>round-rand</author_name>
  <author_url>https://blog.hatena.ne.jp/round-rand/</author_url>
  <blog_title>ランドML</blog_title>
  <blog_url>https://ml-rand-note.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>注意点 delete_prefix：指定した接頭辞を削除 chop：末尾文字の削除 chomp：末尾から改行文字を削除 delete：指定した文字を削除 strip：先頭・末尾の空白文字を削除 参考 注意点 文字列の削除に関するメソッドは&quot;!&quot;をつけない限りは非破壊的です。 配列・ハッシュの削除メソッドは基本的には破壊的なので、気を付けましょう。 delete_prefix：指定した接頭辞を削除 delete_prefixは文字列の先頭から引数で指定した文字列を削除します。 delete_prefix!は破壊的メソッドです。 str = &quot;Hello&quot; # delete_prefix：元の文字…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Fstring-delete&quot; title=&quot;【Ruby】文字列の削除メソッドまとめ(delete_prefix, chop, chomp, delete, strip) - ランドML&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>2026-06-23 00:00:00</published>
  <title>【Ruby】文字列の削除メソッドまとめ(delete_prefix, chop, chomp, delete, strip)</title>
  <type>rich</type>
  <url>https://ml-rand-note.hatenablog.com/entry/ruby/string-delete</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
