implementation of string.h