Change Case of first character of text string
Jim Ault
JimAultWins at yahoo.com
Thu Feb 28 19:58:15 EST 2008
On 2/28/08 3:08 PM, "dcpbarrington" <dpierce at xpertassist.com> wrote:
>
> This has to be very simple, but I cannot find anything in the DOCs or an
> example.
>
> I have a database that I want to allow the user to querry a record by the
> persons last name. So I have a simple entry box with a button to querry the
> database.
>
> Works great as long as the user enters the text string in the same case as
> has been entered in the database. "Smith" = "Smith", but if the user enters
> "smith" in the select box, the record is not found.
>
> I want to do the database select with different text formats to make sure
> that the record is found.
> SELECT on "Smith", "smith", "SMITH"
>
> I found the toupper() and tolower() functions, but how do you get the
> function to change only the first letter toupper in a string?
>
> Thanks in advance for the help. This cannot be that hard.
put toUpper(char 1 of userStr) && toLower(char 2 to -1 of userStr) into
goodStr
Jim Ault
Las Vegas
More information about the use-livecode
mailing list