Added Strings.replaceLast and corresponding tests