-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.js
More file actions
45 lines (29 loc) · 1.22 KB
/
search.js
File metadata and controls
45 lines (29 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const lyrics='tumi bondo kala pakhi, ami jeno ki .bosonto kale tumay bolte pari ni. kala kala sada sada rong jomece vala';
const seachstring='boSonto'
// const doesExit= lyrics.includes('bosonto');
// const doesExit= lyrics.includes('Bosonto');
// const doesExit= lyrics.includes(seachstring);
// 2 ta k lower case kora
const seachstringlower=seachstring.toLowerCase();
const lyricslower=lyrics.toLowerCase();
const doesExit=lyricslower.includes(seachstringlower);
// ak sate ak line a lowercase
const oneLineLower=lyrics.toLowerCase().includes(seachstring.toLowerCase());
// console.log(doesExit);
// console.log(oneLineLower);
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// index of koto number a ace
console.log(lyrics.indexOf('kala'));
console.log(lyrics.indexOf('Tumi'));
if(lyrics.indexOf('sadada') !== -1){
console.log('exits inside the string');
}
else{
console.log('cannot find it')
}
// string ar potom a ki ace chek
console.log(lyrics.startsWith('tumi'));
// string endwith kuja
const file='my pic.png';
const otherfile=' my pdf';
console.log(otherfile.endsWith('pdf.'));