Handbook
Glossary
numeric-charref ( str -- newstr )
Vocabulary
html
.
entities
.
private
Inputs
str
an
object
Outputs
newstr
an
object
Definition
USING:
assocs
combinators.short-circuit
kernel
math
math.order
math.parser
sequences
splitting
strings
;
IN:
html.entities.private
:
numeric-charref
( str -- newstr )
";"
?tail
drop
dup
first
"xX"
member?
[
rest
hex>
]
[
dec>
]
if
invalid-charrefs
?at
[
dup
{
[
55296 57343
between?
]
[
1114111
>
]
}
1||
[
drop
""
]
[
dup
invalid-codepoints
member?
[
drop
""
]
[
1string
]
if
]
if
]
unless
;