Function: klabel:increment-legal

klabel:increment-legal is a byte-compiled function defined in klabel.el.

Signature

(klabel:increment-legal LABEL)

Documentation

Increment full legal LABEL by one and return.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/klabel.el
(defun klabel:increment-legal (label)
  "Increment full legal LABEL by one and return."
  (cond ((string-equal label "0")
	 "1")
	((string-match "[0-9]+$" label)
	 (concat (substring label 0 (match-beginning 0))
		 (int-to-string
		  (1+ (string-to-number (substring label (match-beginning 0)))))))
	(t (error "(klabel:increment-legal): Invalid label, `%s'" label))))