Function: org-id-int-to-b36

org-id-int-to-b36 is a byte-compiled function defined in org-id.el.gz.

Signature

(org-id-int-to-b36 INTEGER &optional LENGTH)

Documentation

Convert an INTEGER to a base-36 number represented as a string.

The returned string is padded with leading zeros to LENGTH if necessary.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-id.el.gz
(defun org-id-int-to-b36 (integer &optional length)
  "Convert an INTEGER to a base-36 number represented as a string.
The returned string is padded with leading zeros to LENGTH if necessary."
  (let ((s "")
        (i integer))
    (while (> i 0)
      (setq s (concat (char-to-string
		       (org-id-int-to-b36-one-digit (mod i 36))) s)
	    i (/ i 36)))
    (setq length (max 1 (or length 1)))
    (if (< (length s) length)
	(setq s (concat (make-string (- length (length s)) ?0) s)))
    s))