v1.17.6
ADDED: * mapsx.(ListSortedKeys|ListSortedValues|SortedKeys|SortedValues)
This commit is contained in:
16 files changed
+960
-15
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Package binarystr parses and renders string (and other) representations of binary data.
|
||||
To distinguish this package from [encoding/binary], this package refers to this string encoding format
|
||||
as "bit encoding" or "bitstrings".
|
||||
|
||||
For example, the original data:
|
||||
|
||||
[]byte("test")
|
||||
|
||||
// Or:
|
||||
// []byte{0x74, 0x65, 0x73, 0x74}
|
||||
|
||||
can be encoded to a bitstring via e.g. [BytesToStr]:
|
||||
|
||||
01110100011001010111001101110100
|
||||
|
||||
And even formatted via [FmtBinStr]:
|
||||
|
||||
// For example, FmtBinStr("01110100011001010111001101110100", "", "", " "):
|
||||
01110100 01100101 01110011 01110100
|
||||
|
||||
// Or FmtBinStr("01110100011001010111001101110100", "", " ", "\n"):
|
||||
0111 0100
|
||||
0110 0101
|
||||
0111 0011
|
||||
0111 0100
|
||||
|
||||
Or can be converted to a series of "binary booleans" via e.g. [BytesToBool]:
|
||||
|
||||
[]bool{
|
||||
false, true, true, true,
|
||||
false, true, false, false,
|
||||
|
||||
false, true, true, false,
|
||||
false, true, false, true,
|
||||
|
||||
false, true, true, true,
|
||||
false, false, true, true,
|
||||
|
||||
false, true, true, true,
|
||||
false, true, false, false,
|
||||
}
|
||||
*/
|
||||
package binarystr
|
||||
Reference in new issue
Block a user