Skip to content

Conversation

RHL120
Copy link

@RHL120 RHL120 commented Feb 12, 2023

No description provided.

@BillKek
Copy link
Contributor

BillKek commented Feb 12, 2023

It became harder to understand.

@RHL120
Copy link
Author

RHL120 commented Feb 12, 2023

It became harder to understand.

Hmm, maybe you are right but to me I can read it in simple english:
if the prefix's length is zero or the the length of the rest of the string (after the cursor) is more than the prefix length and if the string starts with the prefix.
If the string were NULL terminated the second condition could be removed but I checked and it does not seem to be. Plus the previous function implemented the libc function strncmp.
Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants