trimEnd just landed in JSC (bug 182233). Just like `trim` removes whitespace at the beginning and the end of a string, trimEnd removes whitespace only at the end. In Utilities.js we have: String.prototype.trimEnd(maxLength) String.prototype.trimMiddle(maxLength) String.prototype.truncate(maxLength) Our trimEnd truncates a string to a specified maxLength. I suggest to rename: 1. trimEnd to truncateEnd 2. trimMiddle to truncateMiddle
(In reply to Nikita Vasilyev from comment #0) > trimEnd just landed in JSC (bug 182233). Just like `trim` removes whitespace > at the beginning and the end of a string, > trimEnd removes whitespace only at the end. > > In Utilities.js we have: > > String.prototype.trimEnd(maxLength) > String.prototype.trimMiddle(maxLength) > String.prototype.truncate(maxLength) > > Our trimEnd truncates a string to a specified maxLength. > > I suggest to rename: > 1. trimEnd to truncateEnd > 2. trimMiddle to truncateMiddle Sounds okay to me.
Created attachment 333235 [details] Patch
Comment on attachment 333235 [details] Patch r=me with EWS
Comment on attachment 333235 [details] Patch Clearing flags on attachment: 333235 Committed r228214: <https://trac.webkit.org/changeset/228214>
All reviewed patches have been landed. Closing bug.
<rdar://problem/37298532>