lib/rext/string/helpers.rb in visionmedia-rext-0.0.5 vs lib/rext/string/helpers.rb in visionmedia-rext-0.0.6
- old
+ new
@@ -199,6 +199,18 @@
def last n = 1
self[-n, n]
end
+ ##
+ # All characters after +n+.
+ #
+ # === Examples
+ #
+ # '.css'.from(1) #=> css
+ #
+
+ def from n
+ self[n, length]
+ end
+
end