public static void Main() { Mapper map = new Mapper(); string line; while ((line = WmrCommonImpl.getLine()) != null) { int delimIndex = line.IndexOf(WmrCommonImpl.delim); if (delimIndex == -1) { map.map(line, ""); } else { map.map(line.Remove(delimIndex), line.Remove(0, delimIndex + 1)); } } }
public static void advance() { string line = null; line = WmrCommonImpl.getLine(); if (line == null) { nextKey = nextValue = null; return; } int delimIndex = line.IndexOf(WmrCommonImpl.delim); if (delimIndex == -1) { nextKey = line; nextValue = ""; } else { nextKey = line.Remove(delimIndex); nextValue = line.Remove(0, delimIndex + 1); } }