mirror of
				https://github.com/aler9/gortsplib
				synced 2025-10-31 18:42:40 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			271 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			271 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package url
 | |
| 
 | |
| 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, ""
 | |
| }
 | 
