Skip to content
This repository
Browse code

improve String#to docs

  • Loading branch information...
commit 0822dc01f68eb262274fbedcf97a224e6457ff3b 1 parent 3153508
Francesco Rodríguez frodsan authored
4 activesupport/lib/active_support/core_ext/string/access.rb
@@ -34,8 +34,8 @@ def from(position)
34 34 self[position..-1]
35 35 end
36 36
37   - # Returns the beginning of the string up to position. If the position is
38   - # negative, it is counted from the end of the string.
  37 + # Returns a substring from the beginning of the string to the given position.
  38 + # If the position is negative, it is counted from the end of the string.
39 39 #
40 40 # str = "hello"
41 41 # str.to(0) #=> "h"

0 comments on commit 0822dc0

Please sign in to comment.
Something went wrong with that request. Please try again.