Add a null check in DefaultWebClient
Fix a bug in StringTools

When s doesn't contain front string, the start position should be 0