Here you can find the source of arrayReplace(String haystack, String[] search, String[] replacements)
public static String arrayReplace(String haystack, String[] search, String[] replacements)
//package com.java2s; //License from project: Open Source License public class Main { public static String arrayReplace(String haystack, String[] search, String[] replacements) { String toReturn = haystack; for (int i = 0; i < search.length; i++) { toReturn = toReturn.replace(search[i], replacements[i]); }/*from w w w . j ava 2 s . c o m*/ return toReturn; } }