diff options
author | Karl Williamson <khw@cpan.org> | 2021-02-18 16:08:19 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-08-22 06:52:08 -0600 |
commit | 7b12ce912aaddd1bd2f0dfc4cef735d45600d0fa (patch) | |
tree | e9cc3ecc92cb91fcc4b2432c24d6b0247dd9d5b4 /util.c | |
parent | 692d08c5148904dec25634369d9e81ede7ff18ee (diff) | |
download | perl-7b12ce912aaddd1bd2f0dfc4cef735d45600d0fa.tar.gz |
Add my_strftime8()
This is like plain my_strftime(), but additionally returns an indication
of the UTF-8ness of the returned string
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -4189,16 +4189,23 @@ Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, in /* =for apidoc_section $time -=for apidoc my_strftime +=for apidoc my_strftime +=for apidoc_item my_strftime8 + strftime(), but with a different API so that the return value is a pointer to the formatted result (which MUST be arranged to be FREED BY THE -CALLER). This allows this function to increase the buffer size as needed, +CALLER). This allows these functions to increase the buffer size as needed, so that the caller doesn't have to worry about that. -Note that yday and wday effectively are ignored by this function, as +C<my_strftime8> is the same as plain C<my_strftime>, but has an extra +parameter, a pointer to a variable declared as L</C<utf8ness_t>>. +Upon return, its variable will be set to indicate how the resultant string +should be treated with regards to its UTF-8ness. + +Note that yday and wday effectively are ignored by these functions, as mini_mktime() overwrites them -Also note that this is always executed in the underlying locale of the program, +Also note that they are always executed in the underlying locale of the program, giving localized results. =cut |