<commit_before>package http

import (
	"github.com/SimonRichardson/butler/doc"
	"github.com/SimonRichardson/butler/generic"
)

type String struct {
	doc.Api
	value     string
	validator func(rune) bool
}

func NewString(value string, validator func(rune) bool) String {
	return String{
		Api: doc.NewApi(doc.NewDocTypes(
			doc.NewInlineText("Expected string %s"),
			doc.NewInlineText("Unexpected string %s"),
		)),
		value:     value,
		validator: validator,
	}
}

func AnyString() func(rune) bool {
	return func(r rune) bool {
		return true<commit_msg>Some info<commit_after>package http

import (
	"github.com/SimonRichardson/butler/doc"
	"github.com/SimonRichardson/butler/generic"
)

type String struct {
	doc.Api
	value     string
	validator func(rune) bool
}

func NewString(value string, validator func(rune) bool) String {
	return String{
		Api: doc.NewApi(doc.NewDocTypes(
			doc.NewInlineText("Expected string %s"),
			doc.NewInlineText("Unexpected string %s"),
		)),
		value:     value,
		validator: validator,
	}
}

// Series of predicates, could give more info via a Option or Either
func AnyString() func(rune) bool {
	return func(r rune) bool {
		return true
{'fraction_non_alphanumeric': 0.11319148936170213, 'fraction_numerical': 0.0, 'mean_word_length': 4.273542600896861, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '567076', 'n_tokens_mistral': 426, 'n_tokens_neox': 407, 'n_words': 102}