Function: org-remove-tabs

org-remove-tabs is a byte-compiled function defined in org-macs.el.

Signature

(org-remove-tabs S &optional WIDTH)

Documentation

Replace tabulators in S with spaces.

Assumes that s is a single line, starting in column 0.

Source Code

;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-macs.el
(defun org-remove-tabs (s &optional width)
  "Replace tabulators in S with spaces.
Assumes that s is a single line, starting in column 0."
  (setq width (or width tab-width))
  (while (string-match "\t" s)
    (setq s (replace-match
	     (make-string
	      (- (* width (/ (+ (match-beginning 0) width) width))
		 (match-beginning 0)) ?\ )
	     t t s)))
  s)