ui_browsecourses: optimized string compare function