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.1.0.4 tracks/go/exercises/series/first_example.go
trackler-2.1.0.3 tracks/go/exercises/series/first_example.go
trackler-2.1.0.2 tracks/go/exercises/series/first_example.go
trackler-2.1.0.1 tracks/go/exercises/series/first_example.go
trackler-2.1.0.0 tracks/go/exercises/series/first_example.go
trackler-2.0.8.55 tracks/go/exercises/series/first_example.go
trackler-2.0.8.54 tracks/go/exercises/series/first_example.go
trackler-2.0.8.53 tracks/go/exercises/series/first_example.go
trackler-2.0.8.52 tracks/go/exercises/series/first_example.go
trackler-2.0.8.51 tracks/go/exercises/series/first_example.go
trackler-2.0.8.50 tracks/go/exercises/series/first_example.go
trackler-2.0.8.49 tracks/go/exercises/series/first_example.go
trackler-2.0.8.48 tracks/go/exercises/series/first_example.go
trackler-2.0.8.47 tracks/go/exercises/series/first_example.go
trackler-2.0.8.46 tracks/go/exercises/series/first_example.go
trackler-2.0.8.45 tracks/go/exercises/series/first_example.go
trackler-2.0.8.44 tracks/go/exercises/series/first_example.go
trackler-2.0.8.43 tracks/go/exercises/series/first_example.go
trackler-2.0.8.42 tracks/go/exercises/series/first_example.go
trackler-2.0.8.41 tracks/go/exercises/series/first_example.go