
class String
  
  def get_str_byte
    # 将来文字クラスが導入された時に備えて
    #i = 0
    #str.each_byte do |nth|
    #  i += 1
    #end
    #i
    self.size
  end

  def last_char
    if self.size == 0
      nil
    else
      self[(self.size - 1)..-1]
    end
  end

  def last_char_is_linefeed?
    if (self.last_char == "\n") or (self.last_char == "\r\n")
      true
    else
      false
    end
  end

end
