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
A few times I have wanted this, but for a formal use-case something like email standards (RFC 2045, RFC 5322) that require lines to be split into certain lengths, for example. Similarly, see https://www.php.net/manual/en/function.chunk-split.php, but this would be achievable with the above suggestion and a .join("\r\n").
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Like https://www.php.net/manual/en/function.str-split.php
If length is 1 it's the same as
.split(""), so that's not useful. But the other ones are. E.g.Hello Worldsplit withlength=3makesSimilar to
_.chunk(array, [size=1]), but you start with a string instead of array.A few times I have wanted this, but for a formal use-case something like email standards (RFC 2045, RFC 5322) that require lines to be split into certain lengths, for example. Similarly, see https://www.php.net/manual/en/function.chunk-split.php, but this would be achievable with the above suggestion and a
.join("\r\n").Beta Was this translation helpful? Give feedback.
All reactions