private void SplitMatchingBlock(MatchingBlock oldmb, int startpoint, int length, AbstractWordmatch wordmatch) { int oldstart = oldmb.startpoint; int oldlenth = oldmb.length; m_matchblocklist.Remove(oldmb); m_matchblocklist.Add(new MatchingBlock(wordmatch, startpoint, length)); if (oldstart < startpoint) { m_matchblocklist.Add(new MatchingBlock(null, oldstart, startpoint - oldstart)); } if ((oldstart + oldlenth) > (startpoint + length)) { m_matchblocklist.Add(new MatchingBlock(null, startpoint + length, oldstart + oldlenth - startpoint - length)); } }
public string MatchingBlockGetString(MatchingBlock mb) { return(m_string.Substring(mb.startpoint, mb.length)); }
public bool AddMatchingBlock(AbstractWordmatch wordmatch, MatchingBlock oldmb, int relativestartpoint, int length) { return(this.AddMatchingBlock(wordmatch, oldmb.startpoint + relativestartpoint, length)); }