String str = "str";
str.length(); //3 Returns the length of the string
str.indexOf("s"); //0 Returns the index of s starting from 0; if not, returns -1
str.trim(); //"str" Remove the spaces before and after str
str.substring(0,1); //"s" includes the beginning but not the end
str.charAt(0); // 's' Get the 0th character
str.startsWith("s") //true Whether it starts with s
str.endsWith("r") //true Whether it ends with r
str.toLowerCase() / /Convert all str to lowercase
str.toUpperCase() //Convert all str to uppercase
str.valueOf() //Convert the parameters brought in into string