文字を含む部分文字列が含まれているJavaの文字列

String father="Welcome you to come here";
String child ="you";
1.使用のindexOf文字列クラス()メソッドは、値を返す= - !1に記載、この文字列内の文字列インデックスの指定された最初の発生を返します。部分文字列かどうかを決定する工程を含む2. String.matches方法、注意正規表現は3.StringUtils.containsをエスケープメタ文字パケットが4..Stringを提供する文字org.apache.commons.lang.StringUtilsクラスが含まれているかどうかを決定しますメソッドpublic boolean型[1](のCharSequence S)参照:.含ま http://codingstandards.iteye.com/blog/1181490

ます。https://my.oschina.net/itfanr/blog/195672で再現

おすすめ

転載: blog.csdn.net/weixin_34041003/article/details/91799481