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

[REBOL] Re: Constant size string variable?

From: brett:codeconscious at: 2-Dec-2001 10:41

Hi Bob,
> A variable number of digits or letters from 1 to 10 might be entered in > a dialog box. > > If less than ten are entered those character positions are filled with a
> sign (+) preceding the numbers.
If ustr is the entered string: ustr: {12} You could copy as much of a filler string as you need: pstr: {++++++++++} join copy/part pstr subtract length? pstr length? ustr ustr Or insert as many + characters as you need: head insert/dup copy ustr #"+" subtract 10 length? ustr Brett.