Police Can Search You If You Are Under Arrest
After you are arrested, police can search for anything in your possession or immediate surrounding which you might use to injure yourself or others while in custody, or use to aid in your escape and for anything which might be evidence against you. (1) They do not have to search you, and if they do, it cannot be done in an abusive manner.
Strip searches
Strip searches are defined as being the removal or rearrangement of some or all of the clothing of a person so as to permit a visual inspection of a person’s private areas, namely genitals, buttocks, a woman’s breasts, or undergarments.
Strip searches are recognized by law as being a significant invasion of privacy and potentially humiliating and degrading, (2) so the search has to be reasonable which means that it must be for the purposes of finding evidence related to the crime for which you are arrested or for reasons of safety.
The search must be done by a person of the same sex as you.
They can do a body cavity search, but only if they have reasonable grounds, such as where they believe you might be concealing something that could injure yourself or others or that is itself illegal (like drugs) or evidence of another crime. The search must be done by a person the same sex as you.