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

Merge pull request #34 from rumbu13/33

Added String.StartsWith(char8)
This commit is contained in:
Brian Fiete 2020-01-22 05:24:30 -08:00 committed by GitHub
commit 004d5d8d1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1709,6 +1709,11 @@ namespace System
return EqualsHelper(this.Ptr + mLength - b.[Friend]mLength, b.Ptr, b.[Friend]mLength); return EqualsHelper(this.Ptr + mLength - b.[Friend]mLength, b.Ptr, b.[Friend]mLength);
} }
public bool StartsWith(char8 c)
{
return mLength != 0 && Ptr[0] == c;
}
public bool EndsWith(char8 c) public bool EndsWith(char8 c)
{ {
if (mLength == 0) if (mLength == 0)