diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-06-21 19:06:17 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-06-21 19:06:17 -0700 |
commit | 42f28ab8e374137fe3f5d25424489d879d4724f8 (patch) | |
tree | 20353f2446b506d32e6d353b72a57bf48f070389 /vendor/golang.org/x/text/internal/number/number.go | |
parent | 6b39c308d882a0aeac533f8ab1d90b48a2ae4b5a (diff) | |
download | chat-42f28ab8e374137fe3f5d25424489d879d4724f8.tar.gz chat-42f28ab8e374137fe3f5d25424489d879d4724f8.tar.bz2 chat-42f28ab8e374137fe3f5d25424489d879d4724f8.zip |
Updating server dependancies (#6712)
Diffstat (limited to 'vendor/golang.org/x/text/internal/number/number.go')
-rw-r--r-- | vendor/golang.org/x/text/internal/number/number.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/golang.org/x/text/internal/number/number.go b/vendor/golang.org/x/text/internal/number/number.go index 34f4477d0..ea341c796 100644 --- a/vendor/golang.org/x/text/internal/number/number.go +++ b/vendor/golang.org/x/text/internal/number/number.go @@ -121,6 +121,15 @@ func (n Info) WriteDigit(dst []byte, asciiDigit rune) int { return int(n.system.digitSize) } +// AppendDigit appends the UTF-8 sequence for n corresponding to the given digit +// to dst and reports the number of bytes written. dst must be large enough to +// hold the rune (can be up to utf8.UTFMax bytes). +func (n Info) AppendDigit(dst []byte, digit byte) []byte { + dst = append(dst, n.system.zero[:n.system.digitSize]...) + dst[len(dst)-1] += digit + return dst +} + // Digit returns the digit for the numbering system for the corresponding ASCII // value. For example, ni.Digit('3') could return 'δΈ‰'. Note that the argument // is the rune constant '3', which equals 51, not the integer constant 3. |