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: 13-Dec-2001 17:33

Hi Allen, At 07:03 AM 12/13/2001 +1000, you wrote:
>Use the /part refinement of Uppercase. > >proper-case: func [value /local out][ > out: copy "" > value: parse form value none > ;probe value > foreach item value [ > append out join uppercase/part lowercase item 1 " " > ] > trim/tail out >] > >foreach item ["the big do is a pig" "JOHN SmITH" "peter" #"a" "a b c"][print >proper-case item ] > >Cheers, > >Allen K
Many thanks for responding. Unfortunately, I gave a bad example (sorry). The text I need to convert is between tags, in which case your function fails on the first letter after each >.
>> x: {>THE BIG bad dog aTE tHe caT}
== ">THE BIG bad dog aTE tHe caT<"
>> proper-case x
== ">the Big Bad Dog Ate The Cat<"
>>
Louis