lib: add string function from newlib

Signed-off-by: Viller Hsiao <villerhsiao@gmail.com>