public static int count ( final String host , final char charactor ) { int count = 0 ; for ( int i = 0 ; i < host . length ( ) ; i ++ ) { if ( host . charAt ( i ) == charactor ) { count ++ ; } } return count ; }
count char in host string