Java List Merge mergeString(List strs)

Here you can find the source of mergeString(List strs)

Description

merge String

License

Open Source License

Declaration

public static String mergeString(List<String> strs) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {

    public static String mergeString(String... ss) {
        StringBuffer sBuffer = new StringBuffer();
        for (String s : ss) {
            sBuffer.append(s);//from  ww w . jav a  2s.  c  o  m
        }
        return sBuffer.toString();
    }

    public static String mergeString(List<String> strs) {
        StringBuffer sBuffer = new StringBuffer();
        for (String s : strs) {
            sBuffer.append(s);
        }
        return sBuffer.toString();
    }

    public static String mergeString(Object... objs) {
        StringBuffer sBuffer = new StringBuffer();
        for (Object o : objs) {
            sBuffer.append(o);
        }
        return sBuffer.toString();
    }
}

Related

  1. mergeOperations(List> list1, Set ops2)
  2. mergeOrdered( List base, List elems)
  3. mergepath(List pieces, String separator)
  4. mergerList(List sources, List targets)
  5. mergeSpeakerList(List speaker_list)
  6. mergeTimeStrings(List strs)
  7. mergeTo(List target, List source)
  8. mergeToList(Object src, Object... args)
  9. mergeUniqElems(List src, List dest)

  10. HOME | Copyright © www.java2s.com 2016