Change Case of first character of text string

Ian McKnight iangmcknight at googlemail.com
Thu Feb 28 18:35:42 EST 2008


Hi

Try this in the message box

put "abc" into ttxt
put toUpper(char 1 of ttxt) into char 1 of ttxt
put ttxt

will return Abc

Regards

Ian McKnight

On 28/02/2008, 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.
>  --
>  View this message in context: http://www.nabble.com/Change-Case-of-first-character-of-text-string-tp15748287p15748287.html
>  Sent from the Revolution - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>  use-revolution mailing list
>  use-revolution at lists.runrev.com
>  Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>  http://lists.runrev.com/mailman/listinfo/use-revolution
>


-- 
Regards

Ian

=======================
Ian McKnight

iangmcknight at googlemail.com
=======================



More information about the use-livecode mailing list