#NEWLINE# def apply_case( self , s ) : #NEWLINE# #INDENT# if ( not self . casecheck ) : #NEWLINE# #INDENT# return s #NEWLINE# #UNINDENT# if ( self . casemode == 0 ) : #NEWLINE# #INDENT# s = s . lower ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . casemode == 1 ) : #NEWLINE# #INDENT# s = s . upper ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( c . casemode == 2 ) : #NEWLINE# #INDENT# s = s . capitalize ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . casemode == 3 ) : #NEWLINE# #INDENT# s = ' ' . join ( [ c . capitalize ( ) for c in s . split ( ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return s