bearophile Wrote: . > > Try: > import std.string: strip; > ... > highScoreList ~= toInt(strip(file[0 .. nextScore])); > > I have never understand the rationale of not ignoring whitespace inside the > toInt, I think it's an ugly design. > > Bye, > bearophile
That didn't work for me. Doing this: nextScore = std.regexp.find( file, "\n" ); highScoreList ~= toInt( file[ 0 .. nextScore ] ); file = file[ nextScore + 1 .. $ ]; //changed from: file = file[ nextScore .. $ ]; Worked though.