Actually, I didnt need to do that... ,|.((,&2@:-:@:#)$]) 'beef'
Just as silly though. --- Original Message --- From: "Jon Hough" <[email protected]> Sent: June 20, 2015 12:09 AM To: [email protected] Subject: Re: [Jprogramming] Inserting spaces in a string This one is very silly but works... hfd |.dfh ((,&2@:-:@:#)$]) 'beef' --- Original Message --- From: "R.E. Boss" <[email protected]> Sent: June 19, 2015 11:43 PM To: [email protected] Subject: Re: [Jprogramming] Inserting spaces in a string }.,' ',._2[\'93930001029303040593060708' 93 93 00 01 02 93 03 04 05 93 06 07 08 R.E. Boss > -----Original Message----- > From: [email protected] [mailto:programming- > [email protected]] On Behalf Of Aai > Sent: vrijdag 19 juni 2015 8:34 > To: [email protected] > Subject: Re: [Jprogramming] Inserting spaces in a string > > Here's one with variable RHA > > '93930001029303040593060708' (;: inv@ (<\~-)) 2 > > > Vijay Lulla schreef op 19-06-15 om 03:32: > > s=. '93930001029303040593060708' > > }. , _2(' '&,)\ s > > > > On Thu, Jun 18, 2015 at 8:47 PM, Jon Hough <[email protected]> > wrote: > >> I have a hex string > >> 93930001029303040593060708 > >> and I want to insert spaces between each byte, i.e. I want > >> > >> 93 93 00 01 02 93 03 04 05 93 06 07 08 > >> > >> > >> My current method works fine, but seems a little clunky, plus it adds a > trailing space onto the end of the string, which isn't the end of the world and > can be cleaned up, but I want to know a terser, more elegant method. My > current method > >> > >> > >> > >> > >> ,@:(' '&(,~"1))@:(,&2@:(-:@:#) $ ]) > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> ---------------------------------------------------------------------- > >> For information about J forums see > http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > > For information about J forums see > http://www.jsoftware.com/forums.htm > > -- > Met vriendelijke groet, > @@i = Arie Groeneveld > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
