public static int getLineCount ( final String text ) { final Matcher matcher = LINE_FINDER . matcher ( text ) ; int i = 0 ; while ( matcher . find ( ) ) { i ++ ; } return i ; }
Gets a zero - based line count of text .