Java List Replace replace(String s, List replacementVars)

Here you can find the source of replace(String s, List replacementVars)

Description

replace

License

Open Source License

Declaration

public static String replace(String s, List<String> replacementVars) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static String replace(String s, List<String> replacementVars) {
        for (String r : replacementVars) {
            s = s.replaceFirst("\\{\\}", r);
        }//ww  w. j av a 2 s  .  c  o m
        return s;
    }
}

Related

  1. replace(final String source, final List search, final List repl)
  2. replace(List list, Object o, Object n)
  3. replace(List list, T element, List replacements)
  4. replace(List list, char target, char replacement)
  5. replace(List list, T from, T to)
  6. replace(String sourceStr, List indexList, String replaceStr)
  7. replaceAll(final List list, final T element0, final T element1)
  8. replaceAllInList(T a, T b, List list)
  9. replaceAndAdd(List par3List, String translateToLocal)