This project is read-only.
Map a long string in a collection of fixed length fields isn't a new problem but frequently appears in our work day.
So I decided to share a simple but elegant and easy way to deal with in code like:
public enum linguiça
{
fox = 12,
jumps = 6,
over = 5,
brown = 10,
dogs = 10
}
string frase = "The red fox jumps over the brown lazy dogs.";
StringMap dd = new StringMap(frase, typeof(linguiça));
string trecho = dd"fox";
trecho = dd"jumps";
trecho = dd"over";
trecho = dd"brown";
trecho = dd"dogs";
dd"fox" = "iii";
dd"jumps" = "aaa";
dd"over"= "aaa";
dd"brown" = "aaa";
dd"dogs" = "aaa";
trecho = dd.ToString();

Last edited Oct 4, 2012 at 6:53 PM by Oswaldao, version 2