Open vvendigo opened 9 years ago
Hi @vvendigo - I'm maintaining this project from upstream, can you tell me why this method would be preferred? If there is a good reason, I'll merge it in.
Hi! This is just a petty optimization. Strpos() scans all the string in vain if there is no 'og:' in it. Strncmp() compares just first N chars to given string. In the first case === 0 means that string was found at position 0, in the later 0 means that strings are equal. So condition result is the same.
No need to scan all string to find starting substring match