-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate cpad #23187
deprecate cpad #23187
Conversation
base/deprecated.jl
Outdated
@@ -1642,6 +1642,9 @@ end | |||
end | |||
end | |||
|
|||
# PR #23187 | |||
@deprecate cpad(s, n::Integer, p=" ") rpad(lpad(s,div(n+strwidth(s),2),p),n,p) false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more spaces might improve readability? :)
base/pkg/entry.jl
Outdated
@@ -572,7 +572,8 @@ end | |||
|
|||
function warnbanner(msg...; label="[ WARNING ]", prefix="") | |||
cols = Base.displaysize(STDERR)[2] | |||
warn(prefix="", Base.cpad(label,cols,"=")) | |||
str = rpad(lpad(label,div(cols+strwidth(label),2),"="),cols,"=") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise here, a few spaces might improve readability :).
NEWS.md
Outdated
@@ -299,6 +299,8 @@ Deprecated or removed | |||
* Calling `union` with no arguments is deprecated; construct an empty set with an appropriate | |||
element type using `Set{T}()` instead ([#23144]). | |||
|
|||
* `Base.cpad` is removed; use appropriate combination of `rpad` and `lpad` instead ([#23187]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "is removed" -> "has been removed" or "is deprecated", and perhaps "use appropriate" -> "use an appropriate"? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the followup review request! That's a great approach :).
Double time-out on travis... |
Alternative to #22184 / #22186