gpt4 book ai didi

java - 选择大写或小写的字符串

转载 作者:行者123 更新时间:2023-12-01 23:47:34 27 4
gpt4 key购买 nike

我想使用 lambdaJ 从列表中选择特定值,

List<someFriends> newFriends = select(firendsCollection,having(on(someFriends.class).getDescription(),     Matchers.containsString(("michael"))));

我希望它选择像给定字符串一样的值,在这个例子中它工作正常,但只有当单词是“michael”时它才不会识别“Michael”,有没有办法用 LambdaJ 做到这一点?

最佳答案

您可以尝试如下;

List<someFriends> newFriends = select(firendsCollection,having(on(someFriends.class).getDescription(),     Matchers.containsString(("michael")).and(Matchers.containsString(("Michael")))));

关于java - 选择大写或小写的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16808805/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com