Whenever there is a touching of truth in you, the friend is happy. If you're hurting, a friend is compassionate, kind. If you happen to be angry because you're hurting, a friend is even more compassionate. The friend has no opinion about you. The friend has no prejudice about you. The friend sees you just the way you are. So the friend is completely objective, with no emotional bias of any sort. A friend is someone who can see you exactly the way you are at the moment and who is spacious enough and generous enough to allow you to be just that. That's why people like friendship: the friend is somebody with whom you can be yourself.
So a friend is there, is present, to help you understand, to expose what is there in yourself and thus to understand what the situation is, why you are behaving in certain ways and why the situation is as it is. When you understand it, naturally you will know what is the best thing to do. A friend does not give his own opinion and experience, and impose it on you. A friend helps you find your own solution.