转化为小写,再循环寻找
const str = readline();
const word = readline().toLocaleLowerCase();
let i = 0, j = 0
for (; i < str.length; i++) if (str[i].toLocaleLowerCase() === word) j++;
console.log(j);
转化为小写,再循环寻找
const str = readline();
const word = readline().toLocaleLowerCase();
let i = 0, j = 0
for (; i < str.length; i++) if (str[i].toLocaleLowerCase() === word) j++;
console.log(j);