question: public static int len ( String list , char delimiter , boolean ignoreEmpty ) { int len = StringUtil . length ( list ) ; if ( len == 0 ) return 0 ; int count = 0 ; int last = 0 ; for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { if ( ! ignoreEmpty || last < i ) count ++ ; last = i + 1 ; } } if ( ! ignoreEmpty || last < len ) count ++ ; return count ; }
target:  returns count of items in the list