<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>natsutan</author_name>
  <author_url>https://blog.hatena.ne.jp/natsutan/</author_url>
  <blog_title>ぱたへね</blog_title>
  <blog_url>https://natsutan.hatenablog.com/</blog_url>
  <categories>
    <anon>rust</anon>
  </categories>
  <description>Rust Standard Library Cookbook から、気になった配列の操作をメモしました。 要素の取りだし 配列の要素を取り出すにはgetを使います。Option型で返ってくるので、Someかunwrapでその値を取り出せます。[ ]でも同じ動きです。 [ ]を使って配列の領域外にアクセスした場合は、回復できないので実行時エラーとなります。 //配列要素の取り出し let cpus = vec![&quot;sh&quot;, &quot;x86&quot;, &quot;arm&quot;, &quot;mips&quot;]; //getで取り出す。 let second_cpu = cpus.get(1); if let Some(second_cpu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnatsutan.hatenablog.com%2Fentry%2F2018%2F11%2F19%2F182233&quot; title=&quot;Rustの配列操作メモ - ぱたへね&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>2018-11-19 18:22:33</published>
  <title>Rustの配列操作メモ</title>
  <type>rich</type>
  <url>https://natsutan.hatenablog.com/entry/2018/11/19/182233</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
