X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mothurout.cpp;h=61b39514e43b79bc146eb3e37ed4dc8d41017a62;hb=ffc44592ff7ae94f14f9e21f87198e33d323cd1d;hp=0431d36796dd32cf4ac404dee2843150a4b5b110;hpb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;p=mothur.git diff --git a/mothurout.cpp b/mothurout.cpp index 0431d36..61b3951 100644 --- a/mothurout.cpp +++ b/mothurout.cpp @@ -1929,6 +1929,26 @@ void MothurOut::splitAtDash(string& estim, set& container) { exit(1); } } +/***********************************************************************/ +string MothurOut::makeList(vector& names) { + try { + string list = ""; + + if (names.size() == 0) { return list; } + + for (int i = 0; i < names.size()-1; i++) { list += names[i] + ","; } + + //get last name + list += names[names.size()-1]; + + return list; + } + catch(exception& e) { + errorOut(e, "MothurOut", "makeList"); + exit(1); + } +} + /***********************************************************************/ //This function parses the a string and puts peices in a vector void MothurOut::splitAtComma(string& estim, vector& container) {