initial commits
							parent
							
								
									7d9c047db5
								
							
						
					
					
						commit
						d368500976
					
				| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
package separator
 | 
			
		||||
 | 
			
		||||
// ByteIsSeparator returns whether the byte is a 'separator' according to IETF RFC-2616.
 | 
			
		||||
//
 | 
			
		||||
//	separators  = "(" | ")" | "<" | ">" | "@"
 | 
			
		||||
//	            | "," | ";" | ":" | "\" | <">
 | 
			
		||||
//	            | "/" | "[" | "]" | "?" | "="
 | 
			
		||||
//	            | "{" | "}" | SP | HT
 | 
			
		||||
//
 | 
			
		||||
//	SP          = <US-ASCII SP, space (32)>
 | 
			
		||||
//	HT          = <US-ASCII HT, horizontal-tab (9)>
 | 
			
		||||
func ByteIsSeparator(b byte) bool {
 | 
			
		||||
	switch b {
 | 
			
		||||
	case
 | 
			
		||||
		'(',  ')',  '<', '>',  '@',
 | 
			
		||||
		',',  ';',  ':', '\\', '"',
 | 
			
		||||
		'/',  '[',  ']', '?',  '=',
 | 
			
		||||
		'{',  '}',  ' ', '\t':
 | 
			
		||||
		return true
 | 
			
		||||
	default:
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
package separator
 | 
			
		||||
 | 
			
		||||
// RuneIsSeparator returns whether the rune is a 'separator' according to IETF RFC-2616.
 | 
			
		||||
//
 | 
			
		||||
//	separators  = "(" | ")" | "<" | ">" | "@"
 | 
			
		||||
//	            | "," | ";" | ":" | "\" | <">
 | 
			
		||||
//	            | "/" | "[" | "]" | "?" | "="
 | 
			
		||||
//	            | "{" | "}" | SP | HT
 | 
			
		||||
//
 | 
			
		||||
//	SP          = <US-ASCII SP, space (32)>
 | 
			
		||||
//	HT          = <US-ASCII HT, horizontal-tab (9)>
 | 
			
		||||
func RuneIsSeparator(b rune) bool {
 | 
			
		||||
	switch b {
 | 
			
		||||
	case
 | 
			
		||||
		'(',  ')',  '<', '>',  '@',
 | 
			
		||||
		',',  ';',  ':', '\\', '"',
 | 
			
		||||
		'/',  '[',  ']', '?',  '=',
 | 
			
		||||
		'{',  '}',  ' ', '\t':
 | 
			
		||||
		return true
 | 
			
		||||
	default:
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue