initial commits

master
Charles Iliya Krempeaux 2023-12-06 08:15:17 -08:00
parent 7d9c047db5
commit d368500976
4 changed files with 2374 additions and 0 deletions

23
separator/byte.go 100644
View File

@ -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

23
separator/rune.go 100644
View File

@ -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