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

[REBOL] Re: Upper-Lower Case

From: louisaturk:eudoramail at: 14-Dec-2001 3:15

Hi Greg, At 09:20 PM 12/13/2001 -0700, you wrote:
>To meet your needs I added the >/with refinement. > > proper-case: func [ > "Capitalizes the first letter of each word in the string." > s [string!] > /with "specify delimiters other than space and tab." > delimiters [string! block!] > /local > i up-it result > ][ > if not with [delimiters: " ^-"] > result: lowercase copy s > up-it: true > for i 1 length? result 1 [ > if up-it [ > poke result i to-char uppercase to-string result/:i > up-it: false > ] > if find delimiters result/:i [up-it: true] > ] > return result > ] > proper-case "gregg irwin" > proper-case/with "gregg irwin" " " > proper-case/with ">gregg>irwin" " >" > proper-case/with ">gregg irwin<" [#" " #"^-" #">"]
Many thanks. That solves my problem, and I appreciate it very much. This list really has a lot of great people on it. Louis