2 ms·
Wait, trimLeft/trimRight has different semantics from trimStart/trimEnd in RTL languages. So it has to be more than a simple alias, right?
by Bjartr 7y ago
Wait, trimLeft/trimRight has different semantics from trimStart/trimEnd in RTL languages. So it has to be more than a simple alias, right?
- lioeters 7y agoI checked on MDN: "The trimStart() method removes whitespace from the beginning of a string. trimLeft() is an alias of this method." https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... I suspect that trimLeft was misnamed, since its "left" didn't take into account RTL - it just meant start of string.