Sha256: ec30baebffa20460a8fb6cbaf66b2b9eac5f6da2d4f3e68d4c275df0e5de6c75

Contents?: true

Size: 121 Bytes

Versions: 160

Compression:

Stored size: 121 Bytes

Contents

package slice

func First(n int, s string) (string, bool) {
	if n > len(s) {
		return "", false
	}
	return s[:n], true
}

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
trackler-2.0.6.4 tracks/go/exercises/series/first_example.go
trackler-2.0.6.3 tracks/go/exercises/series/first_example.go
trackler-2.0.6.2 tracks/go/exercises/series/first_example.go
trackler-2.0.6.1 tracks/go/exercises/series/first_example.go
trackler-2.0.6.0 tracks/go/exercises/series/first_example.go
trackler-2.0.5.18 tracks/go/exercises/series/first_example.go
trackler-2.0.5.17 tracks/go/exercises/series/first_example.go
trackler-2.0.5.16 tracks/go/exercises/series/first_example.go
trackler-2.0.5.15 tracks/go/exercises/series/first_example.go
trackler-2.0.5.14 tracks/go/exercises/series/first_example.go
trackler-2.0.5.13 tracks/go/exercises/series/first_example.go
trackler-2.0.5.12 tracks/go/exercises/series/first_example.go
trackler-2.0.5.11 tracks/go/exercises/series/first_example.go
trackler-2.0.5.10 tracks/go/exercises/series/first_example.go
trackler-2.0.5.9 tracks/go/exercises/series/first_example.go
trackler-2.0.5.8 tracks/go/exercises/series/first_example.go
trackler-2.0.5.7 tracks/go/exercises/series/first_example.go
trackler-2.0.5.6 tracks/go/exercises/series/first_example.go
trackler-2.0.5.5 tracks/go/exercises/series/first_example.go
trackler-2.0.5.4 tracks/go/exercises/series/first_example.go