A characterization of functions having Zygmund's property