Detection of Unavailable Characters (Tofu Box) in a String

Hi, I wanted to know what is the best way to detect whether a part of string has an unavailable character, '□' (tofu box or last resort character). So far it seems to be that we will have to parse all the strings and individually check for each character and whether or not it is a part of the Unicode Scalar. And since we are a business application that deals with a lot of data as strings, this will be rather performance heavy. So wanted to know if there were any other better or more efficient ways to go about this?

I may be missing something.

Wouldn't

aString.contains("□")

do the job ?

Detection of Unavailable Characters (Tofu Box) in a String
 
 
Q