(String str, String[] suffixes)
| 479 | } |
| 480 | |
| 481 | public static boolean endsWith(String str, String[] suffixes) |
| 482 | { |
| 483 | if (str == null) |
| 484 | { |
| 485 | return false; |
| 486 | } |
| 487 | else if (suffixes == null) |
| 488 | { |
| 489 | return false; |
| 490 | } |
| 491 | else |
| 492 | { |
| 493 | for (int i = 0; i < suffixes.length; ++i) |
| 494 | { |
| 495 | String s = suffixes[i]; |
| 496 | |
| 497 | if (str.endsWith(s)) |
| 498 | { |
| 499 | return true; |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | return false; |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | public static String removePrefix(String str, String prefix) |
| 508 | { |
no outgoing calls
no test coverage detected