mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Simplify bformat
This commit is contained in:
parent
ebfdac4fa3
commit
c7d0ba0f26
@ -1544,11 +1544,7 @@ docstring bformat(docstring const & fmt, docstring const & arg1, int arg2)
|
||||
|
||||
docstring bformat(docstring const & fmt, char const * arg1, docstring const & arg2)
|
||||
{
|
||||
LATTEST(contains(fmt, from_ascii("%1$s")));
|
||||
LATTEST(contains(fmt, from_ascii("%2$s")));
|
||||
docstring str = subst(fmt, from_ascii("%1$s"), from_ascii(arg1));
|
||||
str = subst(str, from_ascii("%2$s"), arg2);
|
||||
return subst(str, from_ascii("%%"), from_ascii("%"));
|
||||
return bformat(fmt, from_ascii(arg1), arg2);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user