Files
go_goutils/stringsx/funcs_asciiinvaliderror.go
T
brent saner 42c0e48081 v1.16.10
ADDED:
* stringsx.RemoveWhitespace, stringsx.StripWhitespace
2026-07-06 16:21:07 -04:00

19 lines
413 B
Go

package stringsx
import (
`fmt`
)
// Error conforms an [AsciiInvalidError] to an error interface.
func (a *AsciiInvalidError) Error() (errStr string) {
errStr = fmt.Sprintf(
"non-ASCII character '%c' at line:linepos %d:%d (byte %d), "+
"string position %d (byte %d): bytes %#x, UTF-8 codepoint U+%04X",
a.BadChar, a.Line, a.LineChar, a.LineByte,
a.Char, a.Byte, a.BadBytes, a.BadChar,
)
return
}