You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: access.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/core_ext/string
    
    the code of the file until where you have to start completion: class String
  # If you pass a single integer, ret
    
  def first(limit = 1)
    if limit == 0
      ''
    elsif limit >= size
      self.dup
    else
      to(limit - 1)
    end