Upgrade to Pro — share decks privately, control downloads, hide ads and more …

はじめてのRuby 第14章 / Ruby Practice 14

muttan
December 09, 2016

はじめてのRuby 第14章 / Ruby Practice 14

muttan

December 09, 2016
Tweet

More Decks by muttan

Other Decks in Programming

Transcript

  1. 14.1 จࣈྻΛ࡞Δ • Ұ൪؆୯ͳจࣈྻΦϒδΣΫτͷ࡞Γํ͸, ʮ” “ʯ͔ʮ’ ‘ʯͰғΉํ๏͕͋Δ. • “ “ͱ’

    ‘ͷҧ͍͸, ‘ ‘ʢγϯάϧΫΥʔςʔγϣ ϯʣͰғΜͩ৔߹͸Raw string literalʹͳΔ. ʢҰ෦ྫ֎ΞϦʣ
  2. 14.9.1
 ΠϯσοΫεૢ࡞ʹؔ͢Δϝιου • s[n] = str (s.slice(n) = str)
 s[n..m]

    = str (s.slice(n..m) = str)
 s[n, len] = str (s.slice(n, len) = str)
 ࢦఆͨ͠ൣғΛstrͰஔ͖׵͑Δ