2UVQONNOLF7IWA5B2J6MABK2RL2IJG44DTPIRKO5ZQZPM7ZBI7AQC
// Package series creates string series.
package series
// All return all n long substrings of s.
func All(n int, s string) []string {
out := []string{}
for i := 0; i <= len(s)-n; i++ {
out = append(out, s[i:i+n])
}
return out
}
// UnsafeFirst returns the first n long substring of s.
func UnsafeFirst(n int, s string) string {
return s[:n]
}
// First returns the first n long substring of s.
func First(n int, s string) (string, bool) {
if n > len(s) {
return "", false
}
return s[:n], true
}