Sha256: 01db95cd4479978789f9e4ea15b3e1d06c93a199ee7aff05721f3e8b80613fd7
Contents?: true
Size: 303 Bytes
Versions: 22
Compression:
Stored size: 303 Bytes
Contents
require 'facet/string/last_char' class String # Returns first _n_ characters. # # "Hello World".first_char(3) #=> "Hel" # def first_char(n=1) slice(0, n.to_i) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # TODO
Version data entries
22 entries across 22 versions & 1 rubygems