{"categories":["Ruby"],"title":"N\u500b\u306e\u8981\u7d20\u306b\u5206\u5272\u3059\u308b\u30fbRuby\u7bc7","description":"\u6628\u65e5\u3084\u3063\u305f\u3053\u3068\u3092Ruby\u3067\u3082\u3002 \u5b9f\u306f(ry \u3053\u3093\u306a\u611f\u3058\u3067\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3002\u3082\u3046\u3061\u3087\u3068\u3059\u3063\u304d\u308a\u3059\u308b\u3093\u3062\u3083\u306a\u3044\u3060\u308d\u3046\u304b\u3001\u3068\u3044\u3046\u30e2\u30e4\u30e2\u30e4\u3057\u305f\u611f\u3058\u304c\u6b8b\u308b\u3002 \u3042\u3068\u3002\u3053\u308c\u306fString\u7279\u5316\u306e\u5b9f\u88c5\u3002\u914d\u5217\u306e\u3070\u3042\u3044\u306f\u5225\u306e\u65b9\u6cd5\u304c\u5fc5\u8981\u3002 \u30b3\u30fc\u30c9\u306fGitHub\u306b\u3082\u7f6e\u3044\u3066\u3042\u308a\u307e\u3059\u3002 class String def divide_into(n) scan(/.{1,#{(size + n - 1) / n}}/) end end \u8a66\u3057\u3066\u307f\u308b\u3002 require './divideInto.rb' p \"12345678\".divide_into 3 \u5b9f\u884c\u7d50\u679c\u3002 $ ruby divideIntoTest.rb [\"123\",\u2026","type":"rich","width":"100%","author_url":"https://blog.hatena.ne.jp/E_Mattsan/","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F20130702%2F1372768342\" title=\"N\u500b\u306e\u8981\u7d20\u306b\u5206\u5272\u3059\u308b\u30fbRuby\u7bc7 - \u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7684\u611b\u60c5\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","author_name":"E_Mattsan","blog_url":"https://blog.emattsan.org/","published":"2013-07-02 21:32:22","url":"https://blog.emattsan.org/entry/20130702/1372768342","height":"190","blog_title":"\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7684\u611b\u60c5"}