.TH DIGITRUNEVALUE 2
.SH NAME
digitrunevalue \- rune to digit value
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.B
int digitrunevalue(Rune r)
.SH DESCRIPTION
.I Digitrunevalue
converts a rune to its value as a decimal
digit.  To convert any coded script's digits
to an integer
.IP
.EX
t = 0;
while(isdigitrune(r = *s++))
	t = t*10 + digitrunevalue(r);
.EE
.SH SOURCE
/sys/src/libc/port/runetype.c
.SH "SEE ALSO"
.IR isalpharune (2)
.SH BUGS
Only understands base 10, and
doesn't handle some scattered digits, notibly
`².'
