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

----- Original Message -----
From: "Dr. Louis A. Turk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 10, 2001 5:55 PM
Subject: [REBOL] Upper-Lower Case


> Hi rebols,
>
> There are the words uppercase and lowercase.  I need an upper-lowercase.
>
> x: upper-lowercase "THE BIG DOG IS A PIG"
>  >> "The Big Dog Is A Pig"
>
> I know that "A" should be "a" for correct English.  But this is not for
the
> English language, and I want to keep it simple.
>
> Does anyone know a short, simple way to do this?
>
> Louis
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
>


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to