Handbook
Glossary
string>points ( str -- n )
Vocabulary
pdf
.
units
Inputs
str
an
object
Outputs
n
an
object
Definition
USING:
ascii
combinators
kernel
math
math.parser
sequences
;
IN:
pdf.units
:
string>points
( str -- n )
dup
[
digit?
]
find-last
drop
1
+
cut
[
string>number
]
dip
{
{
"cm"
[
cm
]
}
{
"in"
[
inch
]
}
{
"pt"
[
]
}
{
""
[
]
}
{
"mm"
[
mm
]
}
{
"pica"
[
pica
]
}
[
throw
]
}
case
;