Java String Replace replace(String target, String replacement, String... args)

Here you can find the source of replace(String target, String replacement, String... args)

Description

replace

License

Open Source License

Declaration

public static String[] replace(String target, String replacement, String... args) 

Method Source Code


//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.util.ArrayList;

public class Main {
    public static String[] replace(String target, String replacement, String... args) {
        ArrayList<String> ret = new ArrayList<String>();
        for (String s : args)
            ret.add(s.replace(target, replacement));
        return ret.toArray(new String[] {});
    }/*from  w  w w  .j  ava  2s.c  om*/
}

Related

  1. replace(String source, String oldChars, String newChars)
  2. replace(String source, String stringToReplace, String replacementString, boolean matchCase)
  3. replace(String str)
  4. replace(String string, String pattern, String value)
  5. replace(String string, String pattern, String value)
  6. replaceAll(String source, String toReplace, String replacement)
  7. replaceEmitKeys(String map, Collection newKeys)
  8. replaceFirst(String input, String search, String replacement)
  9. replaceIgnoreCase(String line, String oldString, String newString)