mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
18 lines
310 B
Go
18 lines
310 B
Go
package base
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// PathSplitQuery splits a path from a query.
|
|
//
|
|
// Deprecated: not useful anymore.
|
|
func PathSplitQuery(pathAndQuery string) (string, string) {
|
|
i := strings.Index(pathAndQuery, "?")
|
|
if i >= 0 {
|
|
return pathAndQuery[:i], pathAndQuery[i+1:]
|
|
}
|
|
|
|
return pathAndQuery, ""
|
|
}
|