Find all complex-valued functions $f$ of a complex variable such that $$f(z)+zf(1-z)=1+z$$
for all $z\in \mathbb{C}$.
1. Given the functional equation:
   \[
   f(z) + z f(1 - z) = 1 + z
   \]
   for all \( z \in \mathbb{C} \).

2. To solve this, we will substitute \( z \) with \( 1 - z \) in the given equation. This gives us:
   \[
   f(1 - z) + (1 - z) f(z) = 1 + (1 - z)
   \]
   Simplifying the right-hand side:
   \[
   f(1 - z) + (1 - z) f(z) = 2 - z
   \]

3. Now we have two equations:
   \[
   \begin{cases}
   f(z) + z f(1 - z) = 1 + z \\
   f(1 - z) + (1 - z) f(z) = 2 - z
   \end{cases}
   \]

4. Let's denote the first equation as (1) and the second as (2):
   \[
   \begin{aligned}
   (1) & \quad f(z) + z f(1 - z) = 1 + z \\
   (2) & \quad f(1 - z) + (1 - z) f(z) = 2 - z
   \end{aligned}
   \]

5. Multiply equation (1) by \( 1 - z \):
   \[
   (1 - z) f(z) + z (1 - z) f(1 - z) = (1 + z)(1 - z)
   \]
   Simplifying the right-hand side:
   \[
   (1 - z) f(z) + z (1 - z) f(1 - z) = 1 - z^2
   \]

6. Now we have:
   \[
   (1 - z) f(z) + z (1 - z) f(1 - z) = 1 - z^2
   \]

7. Subtract equation (2) from this new equation:
   \[
   \left[ (1 - z) f(z) + z (1 - z) f(1 - z) \right] - \left[ f(1 - z) + (1 - z) f(z) \right] = (1 - z^2) - (2 - z)
   \]
   Simplifying the left-hand side:
   \[
   z (1 - z) f(1 - z) - f(1 - z) = 1 - z^2 - 2 + z
   \]
   \[
   (z (1 - z) - 1) f(1 - z) = -1 - z^2 + z
   \]
   \[
   (z - z^2 - 1) f(1 - z) = -1 - z^2 + z
   \]

8. Notice that the left-hand side and right-hand side are equal:
   \[
   (z - z^2 - 1) f(1 - z) = (z - z^2 - 1)
   \]

9. If \( z - z^2 - 1 \neq 0 \), we can divide both sides by \( z - z^2 - 1 \):
   \[
   f(1 - z) = 1
   \]

10. Substituting \( f(1 - z) = 1 \) back into the original equation:
    \[
    f(z) + z \cdot 1 = 1 + z
    \]
    \[
    f(z) + z = 1 + z
    \]
    \[
    f(z) = 1
    \]

11. Therefore, the only function that satisfies the given functional equation is:
    \[
    f(z) = 1
    \]

The final answer is \( \boxed{ f(z) = 1 } \).