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.0.9 tracks/go/exercises/series/first_example.go
trackler-2.0.0.8 tracks/go/exercises/series/first_example.go
trackler-2.0.0.7 tracks/go/exercises/series/first_example.go
trackler-2.0.0.6 tracks/go/exercises/series/first_example.go
trackler-2.0.0.5 tracks/go/exercises/series/first_example.go
trackler-2.0.0.4 tracks/go/exercises/series/first_example.go
trackler-2.0.0.3 tracks/go/exercises/series/first_example.go
trackler-2.0.0.2 tracks/go/exercises/series/first_example.go
trackler-2.0.0.1 tracks/go/exercises/series/first_example.go
trackler-2.0.0.0 tracks/go/exercises/series/first_example.go
trackler-1.0.4.1 tracks/go/exercises/series/first_example.go
trackler-1.0.4.0 tracks/go/exercises/series/first_example.go
trackler-1.0.3.0 tracks/go/exercises/series/first_example.go
trackler-1.0.2.1 tracks/go/exercises/series/first_example.go
trackler-1.0.2.0 tracks/go/exercises/series/first_example.go
trackler-1.0.1.2 tracks/go/exercises/series/first_example.go
trackler-1.0.1.1 tracks/go/exercises/series/first_example.go
trackler-1.0.1.0 tracks/go/exercises/series/first_example.go
trackler-1.0.0.1 tracks/go/exercises/series/first_example.go
trackler-1.0.0 tracks/go/exercises/series/first_example.go