From 27554f2d86c52785a573d4a9fb0cbcc6a3602269 Mon Sep 17 00:00:00 2001 From: pschloss Date: Thu, 26 Aug 2010 20:15:27 +0000 Subject: [PATCH 1/1] modified splitAtComma in mothurout command --- mothurout.cpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) 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