checks if character has previously occurred or not if not then add it to the minimized string ' mstr '
if ( $ flagchar [ ord ( $ ch ) - 97 ] == 0 ) { $ mstr . = $ ch ; $ flagchar [ ord ( $ ch ) - 97 ] = 1 ; } }