“这是保险和保险机构。” 如何用这句话用JSS替换学院的前三个字符? 需要显示如下:“这是保险和保险的JS.Sritute。”
答案 0 :(得分:2)
使用字符串替换功能
String sentence = "This is institute of insurance and insu.";
sentence = sentence.replace("institute", "JSStitute");
答案 1 :(得分:1)
String s = "This is institute of insurance and insu.".replaceFirst("ins", "JSS");