summaryrefslogtreecommitdiff
path: root/src/pkg/unicode/digit.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-01-30 15:38:19 +0100
committerOndřej Surý <ondrej@sury.org>2012-01-30 15:38:19 +0100
commit4cecda6c347bd6902b960c6a35a967add7070b0d (patch)
treea462e224ff41ec9f3eb1a0b6e815806f9e8804ad /src/pkg/unicode/digit.go
parent6c7ca6e4d4e26e4c8cbe0d183966011b3b088a0a (diff)
downloadgolang-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.go8
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)
}