package
0.53.1
Repository: https://github.com/shulhan/share.git
Documentation: pkg.go.dev

# Functions

AppendInt16 append an int16 value into slice of byte.
AppendInt32 append an int32 value into slice of byte.
AppendUint16 append an uint16 value into slice of byte.
AppendUint32 append an uint32 value into slice of byte.
Concat merge one or more []byte or string in args into slice of byte.
Copy slice of bytes from parameter.
CutUntilToken cut text until we found token.
DumpPrettyTable write each byte in slice data as hexadecimal, ASCII character, and integer with 8 columns width.
EncloseRemove given a text, find the leftToken and rightToken and cut the content in between them and return it with status true.
EncloseToken find "token" in "text" and enclose it with bytes from "leftcap" and "rightcap".
Indexes returns the index of the all instance of "token" in "text", or nil if no "token" found.
InReplace replace any characters in "text" that is not in "allowed" with character "c".
IsTokenAt return true if `text` at index `p` match with `token`, otherwise it will return false.
MergeSpaces convert sequences of white spaces into single space ' '.
NewParser create new Parser to parse content using delims as initial delimiters.
ParseHexDump parse the default output of [hexdump](1) utility from parameter in back into stream of byte.
PrintHex will print each byte in slice as hexadecimal value into N column length.
ReadHexByte read two hexadecimal characters from "data" start from index "x" and convert them to byte.
ReadInt16 read int16 value from "data" start at index "x".
ReadInt32 read int32 value from "data" start at index "x".
ReadUint16 read uint16 value from "data" start at index "x".
ReadUint32 read uint32 value from "data" start at index "x".
RemoveSpaces remove all spaces from input in.
SkipAfterToken skip all bytes until matched "token" is found and return the index after the token and boolean true.
SnippetByIndexes take snippet in between of each index with minimum snippet length.
SplitEach split the data into n number of bytes.
TokenFind return the first index of matched token in text, start at custom index.
TrimNull remove 0 value ("\0" or NULL in C) at leading and trailing of in.
WordIndexes returns the index of the all instance of word in s as long as word is separated by space or at the beginning or end of s.
WriteUint16 write uint16 value "v" into "data" start at position "x".
WriteUint32 write uint32 value into "data" start at position "x".

# Structs

Parser implement tokenize parser for stream of byte using one or more delimiters as separator between token.