ยังเพื่อดูว่าเป็นข้อความบรรจุคำที่เป็นว่าแถลงการณ์

รหัสตัวอย่าง

2
0

ยังไงฉันตรวจสอบว่าเป็นบรรจุข้อความมีเหยื่อที่เป็นคำพูดน่ะเหรอ?

$a = 'Hello world?';

if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
    echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
    echo 'true';
}
0
0

ใช้ยังไงที่หาประโยคในข้อความ

String str = "Game of Thrones";  

//This will print "true" because "Game" is present in the given String
System.out.println(str.contains("Game"));

/* This will print "false" because "aGme" is not present, the characters
 * must be present in the same sequence as specified in the contains method
 */
System.out.println(str.contains("aGme"));

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่