diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-01-30 15:38:19 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-01-30 15:38:19 +0100 |
commit | 4cecda6c347bd6902b960c6a35a967add7070b0d (patch) | |
tree | a462e224ff41ec9f3eb1a0b6e815806f9e8804ad /src/pkg/unicode/digit.go | |
parent | 6c7ca6e4d4e26e4c8cbe0d183966011b3b088a0a (diff) | |
download | golang-4cecda6c347bd6902b960c6a35a967add7070b0d.tar.gz |
Imported Upstream version 2012.01.27upstream-weekly/2012.01.27
Diffstat (limited to 'src/pkg/unicode/digit.go')
-rw-r--r-- | src/pkg/unicode/digit.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/unicode/digit.go b/src/pkg/unicode/digit.go index 6793fd7e5..4800bd6ea 100644 --- a/src/pkg/unicode/digit.go +++ b/src/pkg/unicode/digit.go @@ -5,9 +5,9 @@ package unicode // IsDigit reports whether the rune is a decimal digit. -func IsDigit(rune int) bool { - if rune <= MaxLatin1 { - return '0' <= rune && rune <= '9' +func IsDigit(r rune) bool { + if r <= MaxLatin1 { + return '0' <= r && r <= '9' } - return Is(Digit, rune) + return Is(Digit, r) } |