Documentation
¶
Index ¶
- Constants
- Variables
- func BytesToStr(bytes []byte) string
- func IsDocIAL(tokens []byte) bool
- func IsDocIAL2(ial [][]string) bool
- func PathEscape(s string) string
- func PathUnescape(s string) (string, error)
- func RecoverPanic(err *error)
- func StrToBytes(str string) []byte
- func WordCount(str string) (runeCount, wordCount int)
- type EscapeError
- type InvalidHostError
Constants ¶
View Source
const Caret = "‸"
Caret 插入符 \u2038。
View Source
const CaretNewline = Caret + "\n"
CaretNewline 插入符加换行。
View Source
const CaretReplacement = "caretreplacement"
CaretReplacement 用于解析过程中临时替换。
View Source
const FrontEndCaret = "<wbr>"
FrontEndCaret 前端插入符。
View Source
const FrontEndCaretSelfClose = "<wbr/>"
FrontEndCaretSelfClose 前端自动闭合插入符。
View Source
const IALValEscNewLine = "_esc_newline_"
Variables ¶
View Source
var CaretNewlineTokens = []byte(CaretNewline)
CaretNewlineTokens 插入符加换行字节数组。
View Source
var CaretRune = []rune(Caret)[0]
CaretRune 是插入符的 Rune。
View Source
var CaretTokens = []byte(Caret)
CaretTokens 是插入符的字节数组。
Functions ¶
func PathEscape ¶
PathEscape escapes the string so it can be safely placed inside a URL path segment.
func PathUnescape ¶
PathUnescape does the inverse transformation of PathEscape, converting each 3-byte encoded substring of the form "%AB" into the hex-decoded byte 0xAB. It returns an error if any % is not followed by two hexadecimal digits.
PathUnescape is identical to QueryUnescape except that it does not unescape '+' to ' ' (space).
Types ¶
type EscapeError ¶
type EscapeError string
func (EscapeError) Error ¶
func (e EscapeError) Error() string
type InvalidHostError ¶
type InvalidHostError string
func (InvalidHostError) Error ¶
func (e InvalidHostError) Error() string
Click to show internal directories.
Click to hide internal directories.