lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Op Mon, 16 Nov 2020 17:02:39 +0100 schreef Ranier Vilela <ranier.vf@gmail.com>:


strncmp it is not only as fast as strcmp, but it is much more secure.

Acually strncmp must do a extra compare to test if the function has reached 'n' characters.
So strncmp is potentionally slower than a plain strcmp.

https://code.woboq.org/userspace/glibc/string/strncmp.c.html#strncmp

-- Jasper