mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
18 lines
343 B
Java
18 lines
343 B
Java
// "Replace with anyMatch()" "false"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
boolean find(List<String> data, String prefix) {
|
|
if(prefix == null)
|
|
prefix = "xyz";
|
|
for(String e : da<caret>ta) {
|
|
String trimmed = e.trim();
|
|
if(trimmed.startsWith(prefix)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|