I want to use a switch statement to check a string for the words “SUCCESS” and “FAILED” So far I have
But even though the message contains “SUCCESS” It still prints out the “UNKNOWN” Status.
The full Status message looks like this.
SUCCESS DEFAULT SUCCESS
Or FAILED DUPLICATE_ORDER Duplicate order recieved
Or if it’s any other message it should say unknown, if it doesn’t contain SUCCESS or FAILED
Am I doing something wrong here?