Driver program to test above function
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT string = " geeksforgeeks " ; NEW_LINE index = firstRepeating ( string ) ; NEW_LINE if ( index == - 1 ) : NEW_LINE INDENT print ( " Either ▁ all ▁ characters ▁ are " , " distinct ▁ or ▁ string ▁ is ▁ empty " ) ; NEW_LINE DEDENT else : NEW_LINE INDENT print ( " First ▁ Repeating ▁ character ▁ is : " , string [ index ] ) ; NEW_LINE DEDENT DEDENT