设 $f(x)=\left\{\begin{array}{ll}x^2, & x \leq 0 \\ x^2+x, & x>0\end{array}\right.$ ,则
$\text{A.}$ $f(-x)=\left\{\begin{array}{cc}-x^2, & x \leq 0 \\ -\left(x^2+x\right), & x>0\end{array}\right.$
$\text{B.}$ $f(-x)= \begin{cases}-\left(x^2+x\right), & x < 0 \\ -x^2, & x \geq 0\end{cases}$
$\text{C.}$ $f(-x)= \begin{cases}x^2, & x \leq 0 \\ x^2-x, & x>0\end{cases}$
$\text{D.}$ $f(-x)= \begin{cases}x^2-x, & x < 0 \\ x^2, & x \geq 0\end{cases}$