Sha256: beaaa05a7f4b2237718feb1dfc614ef462c9e0f6ed4d11fec9dc8194c9bd3864
Contents?: true
Size: 410 Bytes
Versions: 7
Compression:
Stored size: 410 Bytes
Contents
== String#splice require 'facets/string/splice' a = "HELLO" a.splice(1).assert == "E" a.assert == "HLLO" range a = "HELLO" a.splice(1..2).assert == "EL" a.assert == "HLO" store a = "HELLO" a.splice(1, "X") a.assert == "HXLLO" This could be done if class of 2nd arg is checked. #Unit :splice_length # a = "HELLO" # a.splice(1,2).assert == "EL" # a.assert == "HLO" #end
Version data entries
7 entries across 7 versions & 1 rubygems