initial commits
							parent
							
								
									d368500976
								
							
						
					
					
						commit
						35bab0d265
					
				| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package ctl
 | 
			
		||||
 | 
			
		||||
// ByteIsControl returns whether a byte is a control character, as defined by IETF RFC-2616.
 | 
			
		||||
//
 | 
			
		||||
//	CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
 | 
			
		||||
func ByteIsControlCharacter(value byte) bool {
 | 
			
		||||
	switch {
 | 
			
		||||
	case 0 <= value && value <= 31:
 | 
			
		||||
		return true
 | 
			
		||||
	case 127 == value:
 | 
			
		||||
		return true
 | 
			
		||||
	default:
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
package ctl
 | 
			
		||||
 | 
			
		||||
// RuneIsControl returns whether a rune is a control character, as defined by IETF RFC-2616.
 | 
			
		||||
//
 | 
			
		||||
//	CTL = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
 | 
			
		||||
func RuneIsControlCharacter(value rune) bool {
 | 
			
		||||
	switch {
 | 
			
		||||
	case 0 <= value && value <= 31:
 | 
			
		||||
		return true
 | 
			
		||||
	case 127 == value:
 | 
			
		||||
		return true
 | 
			
		||||
	default:
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue