# Closed curve for an analityc function

If I have an analityc function $$f(z)$$ on a domain $$B \subset \mathbb{C}$$ and a simple and closed curve $$C$$ that encloses $$B$$, and if $$|f|$$ is constant over C, the $$f$$ is constant on $$B$$?

I haven’t found a counterexample but i dont know how to apply the maximum principle or apply some analityc continuation. Please some help with this.

• $f(z) = z$ on $|z| = 1$ ? Otherwise $f(z) =c \frac{z+b}{\overline{b}z+1}$ with $|b| < 1$ on $|z|=1$ – reuns Nov 18 '18 at 4:24
• @reuns: Can you post this as an answer so that this question can be moved out of the Unanswered queue? – aleph_two Dec 20 '18 at 4:35