I have a string as input and have to break the string in two substrings. If the left substring equals the right substring then do some logic.
How can I do this?
If you just need to detect a palindrome, you can do it with a regex, as explained here. Probably not the most efficient approach, though...