Return a new span from the start of this span to the beginning of another.
So I expect this to work:
string source = "123";
Position one = Position.Zero.Advance(source[0]);
TextSpan t1 = new TextSpan(source);
TextSpan t2 = new TextSpan(source, one, 1);
Assert.AreEqual("1",t1.Until(t2).ToStringValue());
But it does not because the code assume that both text spans should end in the same position. This is fine, but this not documented and it is not checked in the code. Am I'm missing something?
TextSpan.Until is documented as
So I expect this to work:
But it does not because the code assume that both text spans should end in the same position. This is fine, but this not documented and it is not checked in the code. Am I'm missing something?