Bifunctional DNA glycosylase/lyase, which excises 5-methylcytosine (5-meC) and 5-hydroxymethylcytosine (5-hmeC), leaving an apyrimidinic (AP) site that is subsequently incised by the lyase activity (PubMed:25240767). Generates 3-phosphor-alpha,beta-unsat