Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
bcontains函数主要是用来对字节流(bytes)中的数据进行匹配,并通过返回一个bool的结果来判断是否匹配成功
bcontains
bool
func (b1 bytes) bcontains(b2 bytes) bool
HTTP/1.1 200 OK Server: nginx Date: Sat, 07 Jan 2023 10:41:06 GMT Content-Type: text/html; charset=utf-8 Connection: close Vary: Accept-Encoding Cache-Control: no-cache Content-Length: 2180 <!DOCTYPE html> <html> <head> <title>abc123</title> </head> <body> asd123 ABC124 </body> </html>
response.body.bcontains(b"abc123")
true
response.body.bcontains(b"asd123")
response.body.bcontains(b"abc124")
false
Was this page helpful?