go-rfc2616/sp/byte_tolerant.go

14 lines
409 B
Go
Raw Normal View History

2023-12-06 15:58:29 +00:00
package sp
// ByteIsSpacingTolerant is a more tolerant version of ByteIsSpacing.
// Where ByteIsSpacing only returns whether the byte is a 'SP' (spacing) character, as defined by IETF RFC-2616:
//
// SP = <US-ASCII SP, space (32)>
//
// ByteIsSpacingTolerant also allows:
//
// HT = <US-ASCII HT, horizontal-tab (9)>
func ByteIsSpacingTolerant(value byte) bool {
return ' ' == value || '\t' == value
}