📅  最后修改于: 2022-03-11 15:02:34.505000             🧑  作者: Mango
var string1 = "foobar";
var string2 = string1.substr(1);
console.log(string2); // shows "oobar"
var string = "//www.pipi.com";
while(string.charAt(0) === '/') { //take character position 0
string = string.substr(1);
}