strchr in an if statement - finding if a character is in a string or not

I'm trying to see if a character exists in a string or not. I'd like to use it in an if statement if possible.
Something like this

  bool tempfg1 = ((strchr(processData,'G')) | (strchr(processData,'I')) | (strchr(processData,'J')) | (strchr(processData,'R')));

In a Google search I came across something similar to above.
if I need to I can create my own function.
Thanks!

Something like this

You might want to pay attention to the difference between | and ||.

Thank-you pepe and PaulS.

I confuse myself sometimes as the code structure for the control system at the plant I work at is

IF (Motionenable | Motionready) & (This > That) THEN
   BEGIN
   //code here
   END

I edited pepe code a little. I pass the string as well as the character I want to search for within the string to the function. In my original line with the tempfg1 I call the function for each character I'm searching for within the string. I prefer doing this so I don't have to find the function to see which characters I'm searching for though I know it will take a ton more processing time to run since it's runs the for loop at total of 8 times, 1 for each character. If I see issues then I'll change back to a single for loop that searches for all the characters I'm looking for.

I also had to change one thing as the code would not compile.

char *p = &processData[0]

I'll post my code later as I'm posting right now on my phone.

Thanks. I have processData defined as:

char processData[40]

I pass that to the function as

findchar(processData[0], 'G')

Then the function is defined as

bool findchar(char string, char character){

I'm hopefully going to get around to testing it tonight.

Are you sure that every character in the string to be searched is upper case? If not, it's going to fail. If you cannot be sure of its case, then something like:

  char c = toupper(*p++);

needs to be added.