add some api for stringpiece