LPS-46230 improve StringUtil.merge: remove incrementation and unnecessary trims