Liking cljdoc? Tell your friends :D

oc.lib.text

Functions related to processing text.

Functions related to processing text.
raw docstring

attributionclj

(attribution attribution-count item-count item-name authors)

Given the number of distinct authors to mention, the number of items, what to call the item (needs to pluralize with just an 's'), and a sequence of authors of the items to attribute (sequence needs to be distinct'able, and have a :name property per author), return a text string that attributes the authors to the items.

E.g.

(attribution 3 7 'comment' [{:name 'Joe'} {:name 'Joe'} {:name 'Moe'} {:name 'Flo'} {:name 'Flo'} {:name 'Sue'}]) '7 comments by Joe, Moe, Flo and others'

Given the number of distinct authors to mention, the number of items, what to call the
item (needs to pluralize with just an 's'), and a sequence of authors of the items
to attribute (sequence needs to be distinct'able, and have a `:name` property per author),
return a text string that attributes the authors to the items.

E.g.

(attribution 3 7 'comment' [{:name 'Joe'} {:name 'Joe'} {:name 'Moe'} {:name 'Flo'} {:name 'Flo'} {:name 'Sue'}])
'7 comments by Joe, Moe, Flo and others'
sourceraw docstring

body-wordsclj

source

new-boards-summary-nodeclj

(new-boards-summary-node new-boards-list board-url-fn)

Give the newly created boards list, creates a phrase like:

  • Since your last digest, 1 topic was created: New topic.
  • Since your last digest, 2 topics were created: First topic and Second topic.
  • Since your last digest, 3 topics were created: First topic, Second topic and Third topic.
  • Since your last digest, 4 topics were created: First topic, Second topic, Third topic and Fourth topic.
Give the newly created boards list, creates a phrase like:
- Since your last digest, 1 topic was created: New topic.
- Since your last digest, 2 topics were created: First topic and Second topic.
- Since your last digest, 3 topics were created: First topic, Second topic and Third topic.
- Since your last digest, 4 topics were created: First topic, Second topic, Third topic and Fourth topic.
sourceraw docstring

replies-summary-textclj

(replies-summary-text {:keys [comment-count comment-authors entry-count]
                       :or {comment-count 0 comment-authors 0 entry-count 0}})

Given a replies summary map, creates a phrase like:

  • Sean Johnson left replies on updates you care about.
  • Sean Johnson and Stuart Levinson left replies on updates you care about.
  • Sean Johnson, Stuart Levinson and 1 other left 6 replies on updates you care about.
  • Sean Johnson, Stuart Levinson and 2 others left 6 replies on updates you care about.
Given a replies summary map, creates a phrase like:

- Sean Johnson left replies on updates you care about.
- Sean Johnson and Stuart Levinson left replies on updates you care about.
- Sean Johnson, Stuart Levinson and 1 other left 6 replies on updates you care about.
- Sean Johnson, Stuart Levinson and 2 others left 6 replies on updates you care about.
sourceraw docstring

strip-xss-tagsclj

This is needed for backward compatibility.

This is needed for backward compatibility.
sourceraw docstring

truncated-bodyclj

(truncated-body body)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close