@@ -13,24 +13,29 @@ defmodule Inspect.Opts do
13
13
When `:as_binaries` all binaries will be printed in bit syntax.
14
14
15
15
When the default `:infer`, the binary will be printed as a string if it
16
- is printable, otherwise in bit syntax.
16
+ is printable, otherwise in bit syntax. See `String.printable?/1` to learn
17
+ when a string is printable.
17
18
18
19
* `:charlists` - when `:as_charlists` all lists will be printed as charlists,
19
20
non-printable elements will be escaped.
20
21
21
22
When `:as_lists` all lists will be printed as lists.
22
23
23
24
When the default `:infer`, the list will be printed as a charlist if it
24
- is printable, otherwise as list.
25
+ is printable, otherwise as list. See `List.ascii_printable?/1` to learn
26
+ when a charlist is printable.
25
27
26
- * `:limit` - limits the number of items that are printed for tuples,
28
+ * `:limit` - limits the number of items that are inspected for tuples,
27
29
bitstrings, maps, lists and any other collection of items. It does not
28
- apply to strings nor charlists and defaults to 50. If you don't want to limit
29
- the number of items to a particular number, use `:infinity`.
30
-
31
- * `:printable_limit` - limits the number of bytes that are printed for strings
32
- and charlists. Defaults to 4096. If you don't want to limit the number of items
33
- to a particular number, use `:infinity`.
30
+ apply to printable strings nor printable charlists and defaults to 50.
31
+ If you don't want to limit the number of items to a particular number,
32
+ use `:infinity`.
33
+
34
+ * `:printable_limit` - limits the number of characters that are inspected
35
+ on printable strings and printable charlists. You can use `String.printable?/1`
36
+ and `List.ascii_printable?/1` to check if a a given string or charlist is
37
+ printable. Defaults to 4096. If you don't want to limit the number of
38
+ characters to a particular number, use `:infinity`.
34
39
35
40
* `:pretty` - if set to `true` enables pretty printing, defaults to `false`.
36
41
0 commit comments