Well, I think deb"1 *would* have removed the spaces, except J had to add
trailing spaces to keep all the rows the same length. Let's try something a
bit different:

   $'a   b    c',:'example      '
2 12
   $ deb "1 'a   b    c',:'example     '
2 7

or,
   'this      is     a      test',:'this is a test'
this      is     a      test
this is a test

   $'this      is     a      test',:'this is a test'
2 28

   $deb"1'   this      is     a      test    ',:'this is a test'
2 14
   deb"1'   this      is     a      test    ',:'this is a test'
this is a test
this is a test

So deb "1 *does* remove all the spaces, but J puts them back as filler to
the right as needed, to keep all the rows even.

Skip


On Tue, Nov 8, 2011 at 2:03 PM, Raul Miller <[email protected]> wrote:

> Except deb"1 does not necessarily remove spaces.
>
> Consider:
>    $'a   b    c',:'example text'
> 2 12
>    $deb"1 'a   b    c',:'example text'
> 2 12
>
> The result has the same number of spaces as the original.  Except some
> of them have been moved to the right:
>
>    'a   b    c',:'example text'
> a   b    c
> example text
>    deb"1 'a   b    c',:'example text'
> a b c
> example text
>
> So, usually when people are manipulating multiple strings they will do
> something different.
>
> Meanwhile, when I want to see what I can get from require'strings' I
> usually use open'strings'.  Except, that does not work under jhs
> (because strings is automatically loaded so it can be safely ignored
> by some of the file manipulating scripts).
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to