diff --git a/BeefLibs/corlib/src/String.bf b/BeefLibs/corlib/src/String.bf index 29f9b27e..799ece55 100644 --- a/BeefLibs/corlib/src/String.bf +++ b/BeefLibs/corlib/src/String.bf @@ -3118,7 +3118,10 @@ namespace System { get { - return .(mPtr + mMatchPos + 1, mStrLen - mMatchPos); + int offset = 0; + if(mMatchPos < mStrLen) + offset = 1; + return .(mPtr + mMatchPos + offset, mStrLen - (mMatchPos+offset)); } } @@ -3306,6 +3309,17 @@ namespace System } } + public StringView Remnant + { + get + { + int offset = 0; + if(mMatchPos < mStrLen) + offset = mMatchLen; + return .(mPtr + mMatchPos + offset, mStrLen - (mMatchPos+offset)); + } + } + public bool MoveNext() mut { if (mCurCount >= mMaxCount)