我有這種情況,我必須用單個字符串值替換多個字符串。完全替換多個字符串
String replacedString = Information.replace("", "Resident Referral").
replace("", "Return Visitor");
Referral
Resident Referral
Resident Referrral -------------- Replace all three with Resident Referral
Return visitor
Return Visitor
Return Vistitor
Return Vistor ----------------- Replace all four with Return Visitor
替換字符串值,其中參考與居民共同推薦和替換字符串值,其中返回是很常見的回報觀衆。
我該如何做到這一點?
你從哪裏得到輸入?一份文件? – hallaksec
對不起,你開始寫代碼;當你有關於代碼的具體問題時,歡迎在這裏提問。截至目前,你的問題並不適合這裏。 – GhostCat
我被卡在這些行@ GhostCat否則我有我的代碼都想通了。 –