question: public static int columnsNumber ( char c , int x , int prevX , int plainSpaceSize ) { if ( c != '\t' ) { return 1 ; } int result = ( x - prevX ) / plainSpaceSize ; if ( ( x - prevX ) % plainSpaceSize > 0 ) { result ++ ; } return result ; }
target:  Allows to answer how many columns are necessary for representation of the given char on a screen.