Replace a string literal with a constant.