Update string.h

fixed index bug