From ab868930efd33c8972793a8a35ecf219d5562b65 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Fri, 16 Aug 2024 16:39:37 -0700 Subject: [PATCH] Update docstring for warp_string and increase max 42 is a little too short, especially when defaults are used --- src/Utils.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils.jl b/src/Utils.jl index 6260cec..90a55fb 100644 --- a/src/Utils.jl +++ b/src/Utils.jl @@ -206,7 +206,7 @@ function seconds_to_prettystr(seconds::Real) end """ - warp_string(str::AbstractString) + warp_string(str::AbstractString; max_width = 70) Return a string where each line is at most `max_width` characters or less or at most one word. @@ -234,7 +234,7 @@ julia> warp_string("\\n space \\n space", max_width = 4) "space\\nspace" ``` """ -function warp_string(str::AbstractString; max_width = 42) +function warp_string(str::AbstractString; max_width = 70) return_str = "" current_width = 0 for word in split(str, isspace)