(1) If a police officer believes on reasonable grounds that it is necessary to search a person who is in lawful custody, a police officer may search that person
(a) for the purpose of ascertaining whether there is concealed on that person or in that person's clothing a weapon or other article capable of being used to inflict injury or to assist that person to escape from custody; or
(ab) for the purpose of removing into safe keeping any other articles belonging to, or in the possession of, the person; or
(b) for the purpose of obtaining evidence relating to the commission of the offence or preventing the loss or destruction of such evidence.
(2) Subsection (1)(b) does not authorise a police officer to require a person to remove any clothing unless there are reasonable grounds for believing that the removal may provide evidence of the commission of an offence.
(3) A police officer may take and retain
(a) any weapon or article found as a result of the search under subsection (1)(a); and
(b) any article of clothing removed under subsection (2).
(4) A police officer may use such force as is reasonably necessary for the purposes of exercising powers under this section.
(5) Nothing in this section prevents a search of a person in lawful custody in any circumstances where it is otherwise lawful to search the person.