Commit Graph

2 Commits

Author SHA1 Message Date
Juha Niskanen
a17bfec43d libc/string: simplify strrchr
Do not call strlen() here. Old implementation iterated
over string twice, if searched for position was at the
beginning. This commit changes strrchr() to scan string
only once, regardless of input.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2022-05-10 23:29:23 +08:00
FASTSHIFT
f3477a86d2 libc/string: add lib_strchrnul. 2021-09-22 09:20:06 -03:00