vsprintf: split out '%s' handling logic