summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@rowman.com>2001-12-25 01:02:12 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-25 15:56:49 +0000
commit7c9e965c652c539b7064f0b192c92dbee8a21bcc (patch)
tree8bec7dba8caa94efdcd93023f5c8266ea1dba311 /util.c
parent763acdb292c461fc4a4211ff9618bbb2633f83b9 (diff)
downloadperl-7c9e965c652c539b7064f0b192c92dbee8a21bcc.tar.gz
Re: Not OK 13881
Message-ID: <3C285CB4.8040006@rowman.com> p4raw-id: //depot/perl@13883
Diffstat (limited to 'util.c')
-rw-r--r--util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/util.c b/util.c
index 09af1de710..eaf169aa46 100644
--- a/util.c
+++ b/util.c
@@ -948,6 +948,25 @@ Perl_form_nocontext(const char* pat, ...)
}
#endif /* PERL_IMPLICIT_CONTEXT */
+/*
+=for apidoc form
+
+Takes a sprintf-style format pattern and conventional
+(non-SV) arguments and returns the formatted string.
+
+ (char *) Perl_form(pTHX_ const char* pat, ...)
+
+can be used any place a string (char *) is required:
+
+ char * s = Perl_form("%d.%d",major,minor);
+
+Uses a single private buffer so if you want to format several strings you
+must explicitly copy the earlier strings away (and free the copies when you
+are done).
+
+=cut
+*/
+
char *
Perl_form(pTHX_ const char* pat, ...)
{