parsing fastq files with D

eastanon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 29 05:46:04 PDT 2016


On Thursday, 24 March 2016 at 06:34:51 UTC, rikki cattermole 
wrote:
> 			void popFront() {
> 				import std.string : indexOf;
> 				
> 				if (source is null) {
> 					isEmpty = true;
> 					return;
> 				}
> 				
> 				void tidyInput() {
> 					foreach(i, c; source) {
> 						switch(c) {
> 							case 0: .. case ' ':
> 								break;
> 							default:
> 								source = source[i .. $];
> 								return;
> 						}
> 					}
> 					
> 					source = null;
> 				}
> 				
> 				tidyInput();

Do you mind to explain  what is really going on at popFront() and 
tidyInput() functions?


More information about the Digitalmars-d-learn mailing list