1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Merge pull request #1905 from Booklordofthedings/master

added remnant property
This commit is contained in:
Brian Fiete 2023-11-28 06:22:03 -05:00 committed by GitHub
commit 59e960b218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3113,6 +3113,17 @@ namespace System
return mMatchPos < mStrLen && (!mSplitOptions.HasFlag(StringSplitOptions.RemoveEmptyEntries) || mStrLen != 0);
}
}
public StringView Remnant
{
get
{
int offset = 0;
if(mMatchPos < mStrLen)
offset = 1;
return .(mPtr + mMatchPos + offset, mStrLen - (mMatchPos+offset));
}
}
public bool MoveNext() mut
{
@ -3298,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)