* String formatting a-la fprint()
@ 2017-11-22 15:08 Victor Porton
2017-11-22 21:20 ` Pascal Obry
0 siblings, 1 reply; 2+ messages in thread
From: Victor Porton @ 2017-11-22 15:08 UTC (permalink / raw)
Despite voices against, I decided to use gettext in my Ada program.
I could form a string as a concatenation:
"Wrong number of predicates <" & URL & "> in node " & URL2 & "."
but this cannot be used with gettext.
I need instead single string like
"Wrong number of predicates <%s> in node %s."
as in C.
The syntax may be different than in C, for example:
"Wrong number of predicates <{arg1}> in node {arg2}."
Which Ada (2012) library would you suggest for such short string templates?
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: String formatting a-la fprint()
2017-11-22 15:08 String formatting a-la fprint() Victor Porton
@ 2017-11-22 21:20 ` Pascal Obry
0 siblings, 0 replies; 2+ messages in thread
From: Pascal Obry @ 2017-11-22 21:20 UTC (permalink / raw)
Le mercredi 22 novembre 2017 à 17:08 +0200, Victor Porton a écrit :
> Which Ada (2012) library would you suggest for such short string
> templates?
GNAT.Formatted_String
--
Pascal Obry / Magny Les Hameaux (78)
The best way to travel is by means of imagination
http://www.obry.net
gpg --keyserver keys.gnupg.net --recv-key F949BD3B
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-22 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 15:08 String formatting a-la fprint() Victor Porton
2017-11-22 21:20 ` Pascal Obry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox