If the charge is still pending in court, your frind may approach the prosecutor and inform him or her that he would like to have the charges dropped. If the the whole situation was a mix up your frined can let the prosecutor know that and without his or her testimony the State most likely will not proceed.
Law Professors are famous for answering legal questions with, "well it all depends!" The same is true here. Once a criminal complaint has been made to law enforcement and the case has been sent to the District Attorney, the case is out of the complainant's hands. The DA decides whether they wish to pursue the case, sometimes regardless of what the original complainant wants. We see this a lot in domestic violence cases. The District Attorney's duty is to protect the public and see that justice is done. Sometimes that means pursuing a criminal case when the original complainant does not want to. Now, that being said, if a complainant makes the DA aware that they do not wish to proceed with the case, usually through an affidavit of non-prosecution then most DA's will consider dropping the case.