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?
public static bool palindrome(string t) { int i = t.Length; for (int j = 0; j < i / 2; j++) { if (t[j] == t[i - j-1]) { continue; } else { return false; break; } } return true; }