发布于 2023-11-03 11:12:18 浏览 225
let str = "Hello, world!";
let index = str.indexOf("world");
console.log(index); // 输出:7
let str = "Hello, world!";
let lastIndex = str.lastIndexOf("o");
console.log(lastIndex); // 输出:7
let str = "Hello, world!";
let hasWorld = str.includes("world");
console.log(hasWorld); // 输出:true
let str = "Hello, world!";
let index = str.search(/world/i);
console.log(index); // 输出:7
let str = "Hello, world!";
let index = str.toLowerCase().indexOf("world".toLowerCase());
console.log(index); // 输出:7
PHP基础 发布于 2023-10-19 10:55:42 浏览 248
PHP基础 发布于 2023-10-08 22:35:40 浏览 244
EXCEL基础 发布于 2023-09-22 00:07:20 浏览 360
EXCEL基础 发布于 2023-05-21 12:56:02 浏览 398
WPS基础 发布于 2022-12-20 20:27:27 浏览 513
EXCEL基础 发布于 2022-11-23 10:30:32 浏览 489
PHP基础 发布于 2022-11-08 21:38:33 浏览 458
EXCEL基础 发布于 2022-10-25 17:27:22 浏览 718
MYSQL 发布于 2022-10-15 11:41:30 浏览 407