MCPcopy Create free account
hub / github.com/apache/brpc / RemoveRtmpPrefix

Function RemoveRtmpPrefix

src/brpc/rtmp.cpp:2721–2730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2719}
2720
2721butil::StringPiece RemoveRtmpPrefix(const butil::StringPiece& url_in) {
2722 if (!url_in.starts_with("rtmp://")) {
2723 return url_in;
2724 }
2725 butil::StringPiece url = url_in;
2726 size_t i = 7;
2727 for (; i < url.size() && url[i] == '/'; ++i);
2728 url.remove_prefix(i);
2729 return url;
2730}
2731
2732butil::StringPiece RemoveProtocolPrefix(const butil::StringPiece& url_in) {
2733 size_t proto_pos = url_in.find("://");

Callers 1

ParseRtmpURLFunction · 0.85

Calls 3

starts_withMethod · 0.80
remove_prefixMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected