From: pschloss Date: Thu, 26 Aug 2010 20:15:27 +0000 (+0000) Subject: modified splitAtComma in mothurout command X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=27554f2d86c52785a573d4a9fb0cbcc6a3602269 modified splitAtComma in mothurout command --- diff --git a/mothurout.cpp b/mothurout.cpp index 5c5fd37..fe3ea09 100644 --- a/mothurout.cpp +++ b/mothurout.cpp @@ -1179,17 +1179,33 @@ void MothurOut::splitAtDash(string& estim, set& container) { //This function parses the a string and puts peices in a vector void MothurOut::splitAtComma(string& estim, vector& container) { try { - string individual; - - while (estim.find_first_of(',') != -1) { - individual = estim.substr(0,estim.find_first_of(',')); - if ((estim.find_first_of(',')+1) <= estim.length()) { //checks to make sure you don't have comma at end of string - estim = estim.substr(estim.find_first_of(',')+1, estim.length()); + string individual = ""; + int estimLength = estim.size(); + for(int i=0;i