(String str, String[] prefixes)
| 453 | } |
| 454 | |
| 455 | public static boolean startsWith(String str, String[] prefixes) |
| 456 | { |
| 457 | if (str == null) |
| 458 | { |
| 459 | return false; |
| 460 | } |
| 461 | else if (prefixes == null) |
| 462 | { |
| 463 | return false; |
| 464 | } |
| 465 | else |
| 466 | { |
| 467 | for (int i = 0; i < prefixes.length; ++i) |
| 468 | { |
| 469 | String s = prefixes[i]; |
| 470 | |
| 471 | if (str.startsWith(s)) |
| 472 | { |
| 473 | return true; |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | return false; |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | public static boolean endsWith(String str, String[] suffixes) |
| 482 | { |
no outgoing calls
no test coverage detected