(String s, char x)
| 492 | } |
| 493 | |
| 494 | public static int count(String s, char x) { |
| 495 | int n = 0; |
| 496 | for (int i = 0; i<s.length(); i++) { |
| 497 | if ( s.charAt(i)==x ) { |
| 498 | n++; |
| 499 | } |
| 500 | } |
| 501 | return n; |
| 502 | } |
| 503 | |
| 504 | public static String expandTabs(String s, int tabSize) { |
| 505 | if ( s==null ) return null; |
no test coverage detected