Handbook
Glossary
string>latitude ( str -- lat/f )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
lat/f
an
object
Definition
USING:
kernel
math
regexp
sequences
;
IN:
metar.private
:
string>latitude
( str -- lat/f )
dup
R/ \d+-\d+(-\d+(\.\d+)?)?[NS]/
matches?
[
unclip-last
[
parse-location
]
[
83
=
[
neg
]
when
]
bi*
]
[
drop
f
]
if
;