Skip to content

Commit 4917425

Browse files
authored
feat: add functions to return word count
1 parent 55a6725 commit 4917425

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/classic.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ func ClassicSentence() string {
2727
return buildClassicText(8)
2828
}
2929

30+
// ClassicWordsPerSentence returns the word count per sentence
31+
func ClassicWordsPerSentence() int {
32+
return 8
33+
}
34+
35+
// ClassicWordsPerSentence returns the word count per praragraph
36+
func ClassicWordsPerParagraph() int {
37+
return len(classicText)
38+
}
39+
3040
// ClassicWords returns the specified number of words from the classic Lorem Ipsum text
3141
func ClassicWords(quantity int) string {
3242
if quantity <= 0 {

0 commit comments

Comments
 (0)