TitleCase on a map/list

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TitleCase on a map/list

Marc Pinnell-3
I would like to format a list of names that have been input by users.  
Some are correctly input, some all lower case, some all upper. I  
jumped at the idea of using ->(titlecase) on the map/list, but I get  
an error, even though it is supposed to work on a variable and a list  
is a variable, right?

Anyway, short of having to pass the name to a variable, then fix the  
case, then display (instead of direct display from the map/list) does  
anyone know of a workaround to format a list of names?

Thanx
Marc

--
Marc Pinnell
1027 Consulting
web << DESIGN >> print
PO Box 990872; Redding, CA 96099-0872
www.1027Consulting.com



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: TitleCase on a map/list

Greg Willits-2
On Sep 15, 2005, at 8:11 AM, Marc Pinnell wrote:

> I would like to format a list of names that have been input by  
> users. Some are correctly input, some all lower case, some all  
> upper. I jumped at the idea of using ->(titlecase) on the map/list,  
> but I get an error, even though it is supposed to work on a  
> variable and a list is a variable, right?
>
> Anyway, short of having to pass the name to a variable, then fix  
> the case, then display (instead of direct display from the map/
> list) does anyone know of a workaround to format a list of names?


->titlecase is going to work on a string, not a map or array or  
anything like that. You'll have to apply title case to each string  
before you insert it in the map. Or you'll have to iterate the map,  
and modify each string if the map already exists.

make sense?

-- greg willits

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: TitleCase on a map/list

Marc Pinnell-3
In reply to this post by Marc Pinnell-3
Unfortunately, yes it makes sense. I was hoping that I missed  
something and could avoid the extra code.

Thanx
marc


On Sep 15, 2005, at 9:28 AM, Greg Willits wrote:

> On Sep 15, 2005, at 8:11 AM, Marc Pinnell wrote:
>
>
>> I would like to format a list of names that have been input by  
>> users. Some are correctly input, some all lower case, some all  
>> upper. I jumped at the idea of using ->(titlecase) on the map/
>> list, but I get an error, even though it is supposed to work on a  
>> variable and a list is a variable, right?
>>
>> Anyway, short of having to pass the name to a variable, then fix  
>> the case, then display (instead of direct display from the map/
>> list) does anyone know of a workaround to format a list of names?
>>
>
>
> ->titlecase is going to work on a string, not a map or array or  
> anything like that. You'll have to apply title case to each string  
> before you insert it in the map. Or you'll have to iterate the map,  
> and modify each string if the map already exists.
>
> make sense?
>
> -- greg willits
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription: http://www.listsearch.com/ 
> lassotalk.lasso?manage
>
>

--
Marc Pinnell
1027 Consulting
web << DESIGN >> print
PO Box 990872; Redding, CA 96099-0872
www.1027Consulting.com



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage