Function: org-count-lines
org-count-lines is a byte-compiled function defined in org-compat.el.
Signature
(org-count-lines S)
Documentation
How many lines in string S?
Source Code
;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-compat.el
(defun org-count-lines (s)
"How many lines in string S?"
(let ((start 0) (n 1))
(while (string-match "\n" s start)
(setq start (match-end 0) n (1+ n)))
(when (and (> (length s) 0) (= (aref s (1- (length s))) ?\n))
(setq n (1- n)))
n))