Package COM. yunos. account. controller. API; import Org. apache. commons. lang. stringutils; public class test {public static void main (string [] ARGs) {string STR = "Hello World";/* intercept string substring */string string1 = Str. substring (5, 10); system. out. println (string1);/* connection string Concat */string concatstring = "yes"; string string2 = concatstring. concat (STR); system. out. println (string2);/* replace string */ String string3 = Str. replace ("hello", "123"); system. out. println (string3);/* remove spaces at the beginning and end of the TRIM */string string4 = "trim ". trim (); system. out. println (string4);/* convert to lowercase tolowercase */string string5 = "asodoiasodi ". tolowercase (); system. out. println (string5);/* convert to uppercase touppercase */string string6 = "asdasdasd ". touppercase (); system. out. println (string6);/* string length */INT Len = "asdasdasd ". length (); s Ystem. out. println (LEN);/* truncates a character charat */Char CH = "asdasdasd ". charat (6); system. out. println (CH);/* bytes */string string7 = "Hello! Hello! "; Byte [] bytes = string7.getbytes (); system. Out. println (bytes);/* string to character array */string string8 =" Hello! Hello! "; Char [] CHS = string8.tochararray (); system. Out. println (CHS. tostring ();/* string comparison function */If (! Str. equals ("1111") {system. out. println ("different strings");}/* whether to start with a specific character */If (Str. startswith ("hello") {system. out. println ("starting with hello");}/* Whether to end with a specific character */If (Str. endswith ("world") {system. out. println ("end with world");}/* find the location where the character appears */int ddd = Str. indexof ("W"); system. out. println (DDD);/* check whether the string is null "*/If (stringutils. isblank (STR) {system. out. println ("null");}/* check that the string is not null "*/If (stringutils. isnotblank (STR) {system. out. println ("null");}/* check whether the string is null and "" */If (stringutils. isempty (STR) {system. out. println ("null");}/* check whether the string is null or "" */If (stringutils. isnotempty (STR) {system. out. println ("null ");}}}