aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-05-22 12:08:41 +0200
committerHans Bolinder <[email protected]>2018-05-22 12:08:41 +0200
commita23181ebd9b081c267542983f3178814433d6450 (patch)
tree6bfd2a491d3398cf856cd3bc32769161294647a9
parentdd3d4d3e7848c63406c346a8ec600b96130da56e (diff)
parent16d3436746250573fc976c043b23c354e6ba3ce6 (diff)
downloadotp-a23181ebd9b081c267542983f3178814433d6450.tar.gz
otp-a23181ebd9b081c267542983f3178814433d6450.tar.bz2
otp-a23181ebd9b081c267542983f3178814433d6450.zip
Merge branch 'hasse/stdlib/chars_limit_io/OTP-14983'
* hasse/stdlib/chars_limit_io/OTP-14983: stdlib: Document details of fwrite/3 option chars_limit
-rw-r--r--lib/stdlib/doc/src/io_lib.xml34
1 files changed, 19 insertions, 15 deletions
diff --git a/lib/stdlib/doc/src/io_lib.xml b/lib/stdlib/doc/src/io_lib.xml
index 4a2b425e8e..a3df2897ac 100644
--- a/lib/stdlib/doc/src/io_lib.xml
+++ b/lib/stdlib/doc/src/io_lib.xml
@@ -163,16 +163,20 @@
<p>Returns a character list that represents <c><anno>Data</anno></c>
formatted in accordance with <c><anno>Format</anno></c> in
the same way as
- <seealso marker="#fwrite/2"><c>fwrite/2</c></seealso> and
- <seealso marker="#format/2"><c>format/2</c></seealso>,
- but takes an extra argument, a list of options.</p>
- <p>Available options:</p>
- <taglist>
- <tag><c><anno>CharsLimit</anno></c></tag>
- <item>
- <p>A soft limit on the number of characters returned.</p>
- </item>
- </taglist>
+ <seealso marker="#fwrite/2"><c>fwrite/2</c></seealso> and
+ <seealso marker="#format/2"><c>format/2</c></seealso>,
+ but takes an extra argument, a list of options.</p>
+ <p>Valid option:</p>
+ <taglist>
+ <tag><c>{chars_limit, <anno>CharsLimit</anno>}</c></tag>
+ <item>
+ <p>A soft limit on the number of characters returned.
+ When the number of characters is reached, remaining
+ structures are replaced by "<c>...</c>".
+ <c><anno>CharsLimit</anno></c> defaults to -1, which
+ means no limit on the number of characters returned.</p>
+ </item>
+ </taglist>
</desc>
</func>
@@ -390,11 +394,11 @@
everything below this level is replaced by "<c>...</c>".
<c><anno>Depth</anno></c> defaults to -1, which means
no limitation. Option <c><anno>CharsLimit</anno></c> puts a
- soft limit on the number of characters returned. When the
- number of characters is reached, remaining structures are
- replaced by "<c>...</c>". <c><anno>CharsLimit</anno></c>
- defaults to -1, which means no limit on the number of
- characters returned.</p>
+ soft limit on the number of characters returned. When the
+ number of characters is reached, remaining structures are
+ replaced by "<c>...</c>". <c><anno>CharsLimit</anno></c>
+ defaults to -1, which means no limit on the number of
+ characters returned.</p>
<p><em>Example:</em></p>
<pre>
1> <input>lists:flatten(io_lib:write({1,[2],[3],[4,5],6,7,8,9})).</input>