字符串去掉最后一个字符
字符串去掉最后一个字符
let str: string = "hello world";
str = str.slice(0, -1); // "hello worl"
let str: string = "hello world";
str = str.substring(0, str.length - 1); // "hello worl"
let str: string = "hello world";
str = str.slice(0, -1); // "hello worl"
let str: string = "hello world";
str = str.substring(0, str.length - 1); // "hello worl"