[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to replace format-like codes in a string?
From: |
Joost Kremers |
Subject: |
Re: How to replace format-like codes in a string? |
Date: |
Fri, 11 Nov 2016 09:48:26 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.1.50.3 |
On Fri, Nov 11 2016, Marcin Borkowski wrote:
I want to write a function like `format', which gets a string
with some
codes embedded (like "%a", "%b" etc., and "%%" to get a
percentage
sign), and convert them to something (say, "%a" to the value of
var-a,
"%b" to var-b etc.). Is there any facility in Elisp to help
with that
or do I have to do a search-and-replace manually?
See `format-spec' and `format-spec-make'.
--
Joost Kremers
Life has its moments