Many years ago when I was a teenager I used to do drugs recreationally because it was fun and I enjoyed it. My parents regularly tried to stop me from doing things, not let me go out with my friends but I used to climb out the window when everyone had gone to bed and walk to parties on my own which looking back was actually really dangerous.
I'm not saying this is what your daughter is doing, but what I'm saying is my parents getting angry and saying I wasn't allowed to do something didn't stop me from doing it.
Now I'm much older I've thought about how I would deal with my children taking drugs. I know you are very concerned but as you mentioned, getting confrontational could push her in the other direction and she might hide it more from you.
I would be honest and say you were just taking some mugs out of her room and found it. Yes she may be angry but the key is how you talk to her about it - not in an angry or confrontational way. Say how you feel, how you are concerned and see if you can get a dialogue going with her but do it gently.
For example, I would say that you are concerned, because although a lot of the time people are fine when they take drugs, sometimes they might not be. Calmly talk to her about the risks - for example. it's best not to mix drugs, or mix them with alcohol. Personally I wouldn't go down the 'you're not allowed' route, because I doubt it will stop her from doing it. Read up on different drugs on www.talktofrank.com so you can use facts to discuss and not just emotions.
I would also absolutely say:
'If you have ever taken something and you don't feel very well, or something doesn't feel right, never ever hesitate to phone me, I won't be angry, I will come and get you and we will sort it out' - I know this feels counterintuitive but I've been in situations where I didn't feel safe but didn't feel I could talk to my parents.
I know that a lot of people will think this is an irresponsible way of dealing with it, but I've always thought it's best if you're children know they can come to you if something is wrong or they need help, rather than thinking they need to hide it from you, and they are more likely to discuss it with you if they don't think you are just going to be angry with them. I think keeping a calm dialogue is the best way to move forward - I really wish I could've had that kind of conversation with my parents when I was a teenager.
Definitely don't swap it.
As for the white powder it could be MDMA, amphetamine, cocaine, ketamine.