Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [Nifty Function of the Day] Pad

From: atruter:labyrinth:au at: 18-Aug-2003 10:54

> pad: func [value width /local op] [ > op: either any-string? value [:tail][:head] > head insert/dup op value: form value " " width - length? value > ] > pad: func [value width [number!]] [ > head insert/dup > do pick [:tail :head] any-string? :value value: form :value > " " width - length? value > ]
Thanks guys, a couple more usefull additions to the REBOL bag of tricks (I'd forgotten about any-string? and insert head, "do pick" is a new one for me) ;) Regards, Ashley