You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `width`: The maximum width of each line. Default is 80.
754
+
- `indent`: The number of spaces to indent each line. Default is 0.
755
+
- `exdent`: The number of spaces to exdent each line. Default is 0.
756
+
- `whitespace_only`: Whether to only wrap on whitespace. Default is true.
757
+
758
+
Returns
759
+
The wrapped string.
760
+
761
+
Examples
762
+
```jldoctest
763
+
julia> str_wrap("This is an example text that should be wrapped based on the given width and breaking rules.", width=20, whitespace_only=true)
764
+
"This is an example\ntext that should be\nwrapped based on the\ngiven width and\nbreaking rules."
765
+
766
+
julia> str_wrap("This is an example text that should be wrapped based on the given width and breaking rules.", width=20, whitespace_only=false)
767
+
"This is an example\ntext that should be\nwrapped based on\nthe given width\nand breaking\nrules."
768
+
769
+
julia> str_wrap("This is an example text that should be wrapped based on the given width and breaking rules.", width=20, indent=4, whitespace_only=true)
770
+
" This is an\n example text\n that should\n be wrapped\n based on the\n given width\n and breaking\n rules."
0 commit comments