17 lines
395 B
C++
17 lines
395 B
C++
#include "../include/NumberHelper.h"
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <vector>
|
|
|
|
vector<int> NumberHelper::getRolls(string csv){
|
|
vector<int> rolls;
|
|
stringstream ss(csv);
|
|
string number;
|
|
|
|
// Get number from the CSV file, split by comma, and convert to int.
|
|
while (getline(ss, number, ',')) {
|
|
rolls.push_back(stoi(number));
|
|
}
|
|
|
|
return rolls;
|
|
} |