mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
16 lines
272 B
Go
16 lines
272 B
Go
package base
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// PathSplitQuery splits a path from a query.
|
|
func PathSplitQuery(pathAndQuery string) (string, string) {
|
|
i := strings.Index(pathAndQuery, "?")
|
|
if i >= 0 {
|
|
return pathAndQuery[:i], pathAndQuery[i+1:]
|
|
}
|
|
|
|
return pathAndQuery, ""
|
|
}
|