There's not a "right thing" to say when your friend tells you she's been assaulted. It's normal to feel confused and even freeze, not knowing how to respond. But even if you didn't respond how you wanted to in retrospect, you can support her well in the weeks and months following. She told you for a reason. Surely you want to fix what happened to her and you want to take the pain away. During this time, you need to be mindful of how you love her. Swooping in to fix all of her problems and protect her may be what you want to do, but it's not what she needs most. Keep the following things in mind as you try to be there for her in the time after she's told you of her assault.
1.) Believe her Statistically, the odds that someone would lie about rape are the same as they are for someone lying about any other crime. When someone says a specific person stole their car, we tend to believe them. Don't make her explain herself, believe her at her words, and if she wants to tell you more, she can. If she says she was raped, chances are that she was, and being called a lair in the face of trauma can only make it worse.
2.) Have her back She may want to report the crime, she may not. Either way she needs your support. The legal system isn't the kindest to women pressing charges for rape, and if she chooses to do so she'll need to know that you have her back and that you'll stick up for her. If she chooses not to even if you think she should, that's not your call. Being raped is traumatic enough, and she may not want to stand up in front of her community and give details about what happened. That's absolutely fair, and you can have her back in that decision as well.
3.) Check-in It may be hard for her to reach out, so every once in a while check in with her. You don't have to show up at her house with steak to do this, a text is fine too. Even if she doesn't want to talk she'll know that you're there when she needs you.
4.) Give her space to make her own decisions After the issue of choice has been so violently taken away from her, its important for her to know that she has the power to make her own choices moving forward. Whether or not she wants to press charges, where she wants to stay, whose company she wants to keep, if she wants to keep in contact with the perpetrator, and every choice she needs to make moving forward needs to be hers. A survivor's choices may not always make the most sense to the people around her, but that's okay as long as she's the one making them. The perpetrator might even be someone she's been in a relationship with, and she may tell you she wants to stay with him after the rape. You may try to change her mind, but it's important that you not abandon her or try to make her leave the relationship. Make sure she knows that she has a safe place with you, and that you will always help her if she changes her mind. She very well may decide to leave him, but that needs to be her decision.
5.) Don't blame yourself, or anyone but the rapist She wasn't assaulted because you were not there to protect her or because she was wearing something revealing. She was assaulted because someone made the choice to violate her. It was the rapist's decision, and no one else's. Placing blame on yourself even if you made a mistake at the time, or asking questions about her behavior that may imply that she did something she shouldn't have done that brought her assault on her implies that assault isn't an active decision of a violent person. She could have been standing naked in a dark room alone with her rapist and he would have still needed to make the choice to assault her. He or anyone actively participating in her assault are the only ones to blame.
It's hard to see someone you love in so much pain. Try your best to love your friend in a way that makes her feel free, even if you want to wrap her in your arms and shield her from all the hurt caused by someone else's violent impulses. What's done is done, but now you can be there for her as she heals.