I think those remove the control characters if they are in the name of the channel.
But maybe they show a slightly neater way of doing it than using replace_all.
it's also not clear to me if these methods are properly aware of character boundaries. There are no comments saying what each routine does.
replace_all looks complicated so I guess it probably is aware of character boundaries, I haven't looked closely at what epgcache does yet.