In the trial of cases for rape or sex offense or attempt to commit rape or attempt to commit a sex offense, the trial judge may, during the taking of the testimony of the prosecutrix, exclude from the courtroom all persons except the officers of the court, the defendant and those engaged in the trial of the case.
N.C. Gen. Stat. § 15-166