{"published":"2022-03-07 13:07:55","image_url":null,"blog_title":"bamchoh\u2019s diary","provider_name":"Hatena Blog","width":"100%","author_name":"bamch0h","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbamch0h.hatenablog.com%2Fentry%2F2022%2F03%2F07%2F130755\" title=\" \u6240\u6709\u6a29? String \u3068 \u6587\u5b57\u5217\u30b9\u30e9\u30a4\u30b9 - bamchoh\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","url":"https://bamch0h.hatenablog.com/entry/2022/03/07/130755","author_url":"https://blog.hatena.ne.jp/bamch0h/","provider_url":"https://hatena.blog","version":"1.0","height":"190","title":" \u6240\u6709\u6a29? String \u3068 \u6587\u5b57\u5217\u30b9\u30e9\u30a4\u30b9","description":"\u6587\u5b57\u30ea\u30c6\u30e9\u30eb Hello \u304b\u3089 String \u3092\u4f5c\u6210\u3057\u3001\u4e00\u90e8\u3092\u6587\u5b57\u5217\u30b9\u30e9\u30a4\u30b9\u3068\u3057\u3066\u5207\u308a\u51fa\u3057\u305f\u5f8c\u3001String \u30b9\u30b3\u30fc\u30d7\u5916\u3067\u6587\u5b57\u5217\u30b9\u30e9\u30a4\u30b9\u3092\u4f7f\u3046\u3002\u3068\u3044\u3046\u30b7\u30ca\u30ea\u30aa\u3092\u8003\u3048\u305f\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3002\u6587\u5b57\u5217\u30b9\u30e9\u30a4\u30b9\u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u5927\u5143\u306e String \u304c\u30b9\u30b3\u30fc\u30d7\u3092\u629c\u3051\u308b\u969b\u306b Drop \u3057\u3066\u3057\u307e\u3046\u305f\u3081\u3060\u3002 fn main() { let sub: &str; { let s = String::from(\"Hello\"); sub = &s[0..2]; // ^ borrowed value does not live long enough } println!(\"{}\", sub)\u2026","blog_url":"https://bamch0h.hatenablog.com/","categories":["Rust"]}