private static int numNewLines ( final String toExamine ) { final char [ ] arr = toExamine . toCharArray ( ) ; int result = 0 ; for ( char ch : arr ) { if ( AbstractTabularComponent . NEWLINE . equals ( new String ( new char [ ] { ch } ) ) ) { result ++ ; } } return result ; }
Returns how many new lines are in the string .