Replace certain string in array of strings

后端 未结 7 914
广开言路
广开言路 2021-01-12 22:07

let\'s say I have this string array in java

String[] test = {"hahaha lol", "jeng jeng jeng", &quo         


        
7条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 22:29

    Straight out of the Java docs... String java docs

    You can do String.replace('toreplace','replacement').

    Iterate through each member of the array with a for loop.

提交回复
热议问题