From 16d3436746250573fc976c043b23c354e6ba3ce6 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 21 May 2018 15:17:09 +0200 Subject: stdlib: Document details of fwrite/3 option chars_limit --- lib/stdlib/doc/src/io_lib.xml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'lib/stdlib/doc') 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 @@

Returns a character list that represents Data formatted in accordance with Format in the same way as - fwrite/2 and - format/2, - but takes an extra argument, a list of options.

-

Available options:

- - CharsLimit - -

A soft limit on the number of characters returned.

-
-
+ fwrite/2 and + format/2, + but takes an extra argument, a list of options.

+

Valid option:

+ + {chars_limit, CharsLimit} + +

A soft limit on the number of characters returned. + When the number of characters is reached, remaining + structures are replaced by "...". + CharsLimit defaults to -1, which + means no limit on the number of characters returned.

+
+
@@ -390,11 +394,11 @@ everything below this level is replaced by "...". Depth defaults to -1, which means no limitation. Option CharsLimit puts a - soft limit on the number of characters returned. When the - number of characters is reached, remaining structures are - replaced by "...". CharsLimit - defaults to -1, which means no limit on the number of - characters returned.

+ soft limit on the number of characters returned. When the + number of characters is reached, remaining structures are + replaced by "...". CharsLimit + defaults to -1, which means no limit on the number of + characters returned.

Example:

 1> lists:flatten(io_lib:write({1,[2],[3],[4,5],6,7,8,9})).
-- 
cgit v1.2.3