summaryrefslogtreecommitdiff
path: root/pod/perlclib.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-04-30 10:46:01 -0600
committerKarl Williamson <khw@cpan.org>2018-06-25 07:33:26 -0600
commit6928bedc792ff80f0cb915460a7eacae25fa9bdd (patch)
treecb3daacc7529120825d1bbe72bd3a112cdf9f9f6 /pod/perlclib.pod
parent808ea3ad2891b03a3f9c239b9b99d56b4765d765 (diff)
downloadperl-6928bedc792ff80f0cb915460a7eacae25fa9bdd.tar.gz
Create my_atof3()
This is like my_atof2(), but with an extra argument signifying the length of the input string to parse. If that length is 0, it uses strlen() to determine it. Then my_atof2() just calls my_atof3() with a zero final parameter. And this commit just uses the bulk of the current my_atof2() as the core of my_atof3(). Changes were needed however, because it relied on NUL-termination in a number of places. This allows one to convert a string that isn't necessarily NUL-terminated to an NV.
Diffstat (limited to 'pod/perlclib.pod')
-rw-r--r--pod/perlclib.pod2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlclib.pod b/pod/perlclib.pod
index b366c7f87e..1e6cf779a0 100644
--- a/pod/perlclib.pod
+++ b/pod/perlclib.pod
@@ -205,7 +205,7 @@ C<toUPPER_uni>, as described in L<perlapi/Character case changing>.)
atof(s) Atof(s)
atoi(s) grok_atoUV(s, &uv, &e)
atol(s) grok_atoUV(s, &uv, &e)
- strtod(s, &p) Nothing. Just don't use it.
+ strtod(s, &p) my_atof3(s, &nv, &p) is the closest we have
strtol(s, &p, n) grok_atoUV(s, &uv, &e)
strtoul(s, &p, n) grok_atoUV(s, &uv, &e)