Sha256: fe2e9170b7abc4d513e7f17fa1c41450def5ecbbc7117244f3e7ba7a800cf35a
Contents?: true
Size: 296 Bytes
Versions: 12
Compression:
Stored size: 296 Bytes
Contents
class String # Returns true iff +other+ appears exactly at the start of +self+. def starts_with? other self[0, other.length] == other end # Returns true iff +other+ appears exactly at the end of +self+. def ends_with? other self[-other.length, other.length] == other end end
Version data entries
12 entries across 12 versions & 1 rubygems