2017-03-05 slice 文字列の場所を指定して文字を削除する ruby #最後の文字を削除する場合 word = study length = word.length word = word.slice(0, length - 1)