]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
changed rarefaction.single output
[mothur.git] / mothurout.cpp
index 001e8c48a8932374d7266b4e6097036c5b2ed9ac..c58e634500270cce359470ebc56f7244ef994c8c 100644 (file)
@@ -1477,6 +1477,26 @@ int MothurOut::getNumNames(string names){
 }
 /***********************************************************************/
 
+int MothurOut::getNumChar(string line, char c){
+       try {
+               int count = 0;
+               
+               if(line != ""){
+                       for(int i=0;i<line.size();i++){
+                               if(line[i] == c){
+                                       count++;
+                               }
+                       }
+               }
+               
+               return count;
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "getNumChar");
+               exit(1);
+       }
+}
+/***********************************************************************/
 int MothurOut::mothurRemove(string filename){
        try {
                filename = getFullPathName(filename);