Create a function that can determine whether or not an arbitrary DNA string is a Watson-Crick palindrome. The function will take a DNA string and output a true value if the string is a Watson-Crick palindrome and a false value if it is not. (True and False can also be represented as 1 and 0, respectively.)
The DNA string may either be in all uppercase or all lowercase depending on your preference.
Also, the DNA string will not be empty.
A DNA string is a Watson-Crick palindrome when the complement of its reverse is equal to itself.
Given a DNA string, first reverse it, and then complement each character according to the DNA bases (A ↔ T and C ↔ G). If the original string is equal to the complemented-reverse string, it is a Watson-Crick palindrome.
For more, see this question. It is a different challenge where you must find the longest substring of a DNA string where that substring is a Watson-Crick palindrome.
This is code-golf and the shortest code wins.
The format is
<input> = <output>.
ATCGCGAT = true AGT = false GTGACGTCAC = true GCAGTGA = false GCGC = true AACTGCGTTTAC = false ACTG = false