Codebase list golang-github-rivo-uniseg / 3cc30e0
Import Debian changes 0.2.0-1 golang-github-rivo-uniseg (0.2.0-1) unstable; urgency=medium * New upstream release * reverse dependencies successfully built with ratt: - nothing todo for this package Thorsten Alteholz 3 years ago
4 changed file(s) with 26 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
0 golang-github-rivo-uniseg (0.2.0-1) unstable; urgency=medium
1
2 * New upstream release
3 * reverse dependencies successfully built with ratt:
4 - nothing todo for this package
5
6 -- Thorsten Alteholz <debian@alteholz.de> Sun, 13 Dec 2020 19:01:53 +0000
7
08 golang-github-rivo-uniseg (0.1.0-2) unstable; urgency=medium
19
210 * upload source package
00 Source: golang-github-rivo-uniseg
1 Section: devel
1 Section: golang
22 Priority: optional
33 Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
44 Uploaders:
00 version=4
11 opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/golang-github-rivo-uniseg-\$1\.tar\.gz/,\
22 uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \
3 https://github.com/rivo/uniseg/tags .*/v?(\d\S*)\.tar\.gz
3 https://github.com/rivo/uniseg/tags .*/v?(\d\S*)\.tar\.gz debian uupdate
00 package uniseg
1
2 import "unicode/utf8"
13
24 // The states of the grapheme cluster parser.
35 const (
117119
118120 // NewGraphemes returns a new grapheme cluster iterator.
119121 func NewGraphemes(s string) *Graphemes {
120 g := &Graphemes{}
121 for index, codePoint := range s {
122 g.codePoints = append(g.codePoints, codePoint)
123 g.indices = append(g.indices, index)
124 }
125 g.indices = append(g.indices, len(s))
122 l := utf8.RuneCountInString(s)
123 codePoints := make([]rune, l)
124 indices := make([]int, l+1)
125 i := 0
126 for pos, r := range s {
127 codePoints[i] = r
128 indices[i] = pos
129 i++
130 }
131 indices[l] = len(s)
132 g := &Graphemes{
133 codePoints: codePoints,
134 indices: indices,
135 }
126136 g.Next() // Parse ahead.
127137 return g
128138 }