Documentation ¶
Index ¶
- Constants
- func CommonOverlapLength(b1, b2 []byte) int
- func CommonPrefixLength(b1, b2 []byte) int
- func CommonSuffixLength(b1, b2 []byte) int
- func FromRunes(rs []rune) []byte
- func FromStringUnsafe(s string) []byte
- func IndexFrom(s, substr []byte, from int) int
- func IsASCII(b byte) bool
- func IsControl(b byte) bool
- func IsDigit(b byte) bool
- func IsGraph(b byte) bool
- func IsHexDigit(b byte) bool
- func IsLetter(b byte) bool
- func IsLetterOrDigit(b byte) bool
- func IsLower(b byte) bool
- func IsPrint(b byte) bool
- func IsPunct(b byte) bool
- func IsSymbol(b byte) bool
- func IsUpper(b byte) bool
- func IsWhiteSpace(b byte) bool
- func Itoa(num, base int) []byte
- func Quote(b []byte, mark byte) []byte
- func Random(length uint) []byte
- func RandomHex(length uint) []byte
- func ReadQuote(b []byte, mark byte, i uint) ([]byte, uint)
- func Reverse(b []byte) []byte
- func StringUnsafe(b []byte) string
- func Utoa(num, base int) []byte
Constants ¶
const ( NUL = 0x00 // '\0' Null SOH = 0x01 // Start of Header STX = 0x02 // Start of Text ETX = 0x03 // End of Text EOT = 0x04 // End of Transmission ENQ = 0x05 // Enquiry ACK = 0x06 // Acknowledgement BEL = 0x07 // '\a' Bell BS = 0x08 // '\b' Backspace HT = 0x09 // '\t' Horizontal Tab LF = 0x0A // '\n' Line Feed VT = 0x0B // '\v' Verical Tab FF = 0x0C // '\f' Form Feed CR = 0x0D // '\r' Carriage return SO = 0x0E // Shift Out SI = 0x0F // Shift In DLE = 0x10 // Device Idle DC1 = 0x11 // Device Control 1 DC2 = 0x12 // Device Control 2 DC3 = 0x13 // Device Control 3 DC4 = 0x14 // Device Control 4 NAK = 0x15 // Negative Acknoledgement SYN = 0x16 // Synchronize ETB = 0x17 // End of Transmission Block CAN = 0x18 // Cancel EM = 0x19 // End of Medium SUB = 0x1A // Substitute ESC = 0x1B // '\e' Escape FS = 0x1C // Field Separator GS = 0x1D // Group Separator RS = 0x1E // Record Separator US = 0x1F // Unit Separator SP = 0x20 // Space DEL = 0x7F // Delete )
Constants for ASCII characters without printable symbols.
Variables ¶
This section is empty.
Functions ¶
func CommonOverlapLength ¶
CommonOverlapLength returns the length of the common overlap of two bytes
func CommonPrefixLength ¶
CommonPrefixLength returns the length of the common prefix of two bytes
func CommonSuffixLength ¶
CommonSuffixLength returns the length of the common suffix of two bytes
func FromStringUnsafe ¶
FromStringUnsafe return a unsafe []byte base on string
func IsGraph ¶
IsGraph return true if b is a character with a graphic represntation; otherwise, return false.
func IsHexDigit ¶
IsHexDigit return true if b is a hexadecimal digit; otherwise, return false.
func IsLetterOrDigit ¶
IsLetterOrDigit return true if b is a letter or decimal digit; otherwise, return false.
func IsPrint ¶
IsPrint return true if b is a character with a print represntation; otherwise, return false.
func IsPunct ¶
IsPunct return true if b is a punctuation character (!"#%&'()*,-./:;?@[\]_{}); otherwise, return false.
func IsWhiteSpace ¶
IsWhiteSpace return true if b is a space character (space, tab, vertical tab, form feed, carriage return, or linefeed); otherwise, return false.
func StringUnsafe ¶
StringUnsafe return a unsafe string base on []byte
Types ¶
This section is empty.