FillZpp / sys-info-rs

Get system information in Rust.
MIT License
168 stars 56 forks source link

replace index(3) with strchr(3) #94

Open leleliu008 opened 3 years ago

leleliu008 commented 3 years ago
index(3) and rindex(3) marked as LEGACY in POSIX.1-2001. 

POSIX.1-2008 removes the specifications of index(3) and rindex(3), recommending strchr(3) and strrchr(3) instead.

Android NDK don't have this function.

References: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html https://linux.die.net/man/3/index