select a substring of `s` beginning at `beginning` of length `LENGTH`,s = s[beginning:(beginning + LENGTH)]