XU XUv0.8.8
中文

API

#html

import: #html

counts: 2 fns, 0 methods, 0 types, 0 consts, 0 ifaces

escape_string / unescape_string (five specials and numeric entities).

escape_string

XuAPI
pub fn escape_string(s &string) string

Purpose

HTML escaping aligned with `html.EscapeString` / `UnescapeString` subset. Named entities: five XML specials plus a small HTML set (nbsp/copy/…) numeric &#Dec; / &#xhex;.

Parameters

s &string
source string (borrowed; caller keeps it; type &string)

Returns

string — result string

unescape_string

XuAPI
pub fn unescape_string(s &string) string

Purpose

Unescape.

Parameters

s &string
source string (borrowed; caller keeps it; type &string)

Returns

string — result string