How do I check for adjacent characters and if they match, delete one?

What is the output for this character? @Vlad_Svitelskyi