Add: check in RmFront

This commit is contained in:
Pavel Dvas 2024-08-08 15:56:23 +03:00
parent cb07b6ac62
commit 6c110b9a8b

View File

@ -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):])
}