{"modulePath":"github.com/bootcode-cn/tester-utils","version":"v1.18.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package inspectable_byte_string\n\n## Types\n\n```go\ntype InspectableByteString struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewInspectableByteString(bytes []byte) InspectableByteString\n```\n\n```go\nfunc (s InspectableByteString) FormatWithHighlightedOffset(highlightOffset int, highlightText string, formattedStringPrefix string, formattedStringSuffix string) string\n```\nFormatWithHighlightedOffset returns a string that represents the bytes with the byteOffset highlighted\n\nFor example, if called with highlightOffset 4, highlightText \"error\" and formattedString \"Received: \", the return value will be:\n\n\u003e Received: \"+OK\\\\r\\\\n\" \u003e                 ^ error\n\n```go\nfunc (s InspectableByteString) FormattedString() string\n```\n\n```go\nfunc (s InspectableByteString) GetOffsetInFormattedString(byteOffset int) int\n```\nGetOffsetInFormattedString returns a string that represents the byteOffset in the formatted string\n\nFor example:\n\n  - If the string is \"+OK\\\\r\\\\n\"\n  - And byteOffset is 4 (i.e. \\\\n, the 5th byte)\n  - The return value will be 6 (i.e. the 6th character in the formatted string)\n\n```go\nfunc (s InspectableByteString) TruncateAroundOffset(offset int) InspectableByteString\n```\n\n","path":"github.com/bootcode-cn/tester-utils/inspectable_byte_string","name":"inspectable_byte_string","synopsis":"","isRedistributable":true}
