Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (string s in dataSequence)
- {
- int rest = data.Length%stepSize;
- for (int i = 0; i < data.Length - rest; i += stepSize)
- {
- string first = data.Substring(i, stepSize);
- string followedBy = "";
- if (i == data.Length - (rest + stepSize))
- followedBy = data.Substring(i + stepSize, rest);
- else
- followedBy = data.Substring(i + stepSize, stepSize);
- if (!_rules.ContainsKey(first))
- {
- _rules.Add(first, new List<string>());
- }
- _rules[first].Add(followedBy);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement