Add: check in RmFront
This commit is contained in:
parent
cb07b6ac62
commit
6c110b9a8b
@ -9,6 +9,9 @@ func (resp Resp) Check() bool {
|
||||
}
|
||||
|
||||
func (resp Resp) RmFront(str string) Resp {
|
||||
if !resp.Check() {
|
||||
return RespNil
|
||||
}
|
||||
return Resp(string(resp)[len(str):])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user