Java/検索

提供: 初心者エンジニアの簡易メモ
ナビゲーションに移動 検索に移動

検索

String str = "hogepiyo";
if (str.indexOf("piyo") > -1) {
   // hit
}