In order to compare strings, they must be converted to bytes. A commonly used version of equals() is available on the internet
Ethereum Developer Masterclass
Key takeaways from Udemy's course 'Ethereum Developer Masterclass: Build Real World Projects'.