TRIM Block
Like trim on strings you can now do trim on blocks. But, rather than remove spaces, trim on blocks removes NONEs.
Valid refinements are /all, /head, and /tail, and work as you would expect (same as strings).
Example is:
>> blk: reduce [1 none "test" none 'word]
>> trim/all blk
== [1 "test" word]
This native action is much faster than doing it at mezzaine level.
Perhaps later we can add /with refinement to trim other types of values, or even values by datatype (like trim/with block string! to remove all strings).
7 Comments
|