So I have an array of data...
struct romanSystemData {
string digit;
uint value;
ulong regionIndex;
ulong previous;
};
immutable romanSystemData romanSystem[] = [
{"" , 0, 0, 0},//0
{"I", 1, 0, 0},//1 8-7
{"V", 5, 1, 1},//2 8-6
{"X", 10, 1, 2},//3 8-5
{"L", 50, 3, 3},//4 8-4
{"C", 100, 3, 4},//5 8-3
{"D", 500, 5, 5},//6 8-2
{"M", 1000, 5, 6} //7 8-1
];
I'm happy I can use this look up table ...
assert( 10 == find!"(a.digit == b)"( romanSystem, "X").front.value);
Now I'm sure I can use std.algorithm map to convert say a string of characters "IVXLCDM" into an array [1,5,10,50,100,500,1000]