Capitalize...for a short time

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

Capitalize...for a short time

Viaduct Productions
Any way to capitalize for a short time?  This seems kind of long:

var('thing' = 'moosehair');
($thing->titlecase &) '<br><br>';
$thing->lowercase;


Rich in Toronto
...NOW go get on your moose


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Capitalize...for a short time

Göran Törnquist-2
Using css maybe better?

<span style="text-transform: uppercase;">Jane Doe</span>

/Göran

Viaduct Productions wrote:

> Any way to capitalize for a short time?  This seems kind of long:
>
> var('thing' = 'moosehair');
> ($thing->titlecase &) '<br><br>';
> $thing->lowercase;
>
>
> Rich in Toronto
> ...NOW go get on your moose
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>
>
>


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Capitalize...for a short time

James Harvard
In reply to this post by Viaduct Productions
>Any way to capitalize for a short time?  This seems kind of long:
>
>var('thing' = 'moosehair');
>($thing->titlecase &) '<br><br>';
>$thing->lowercase;

Use the member tag on a copy of the object.

var( 'thing' = 'moosehair' );
encode_html( string($thing)->titlecase& );
' not ';
encode_html( $thing );

The lack of a string_titlecase tag is a bit of an omission - that would be less verbose as it would give HTML encoding too.

James

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


Reply | Threaded
Open this post in threaded view
|

Re: Capitalize...for a short time

CoMedia
In reply to this post by Göran Törnquist-2
Göran,

The CSS equivalent for titlecase would be capitalize, not uppercase, so your example should read like

<span style="text-transform: capitalize;">Jane Doe</span>

Of course you cannot use CSS for every purpose, but in most cases this will do the job.

-- Alfred

Göran Törnquist-2 wrote
Using css maybe better?

<span style="text-transform: uppercase;">Jane Doe</span>

/Göran
Reply | Threaded
Open this post in threaded view
|

Re: Capitalize...for a short time

Göran Törnquist-2
In reply to this post by Viaduct Productions
Yes, you're right. I saw that I used the wrong one just a split of a
second after sending the message. :-)

/Göran

CoMedia wrote:

> Göran,
>
> The CSS equivalent for titlecase would be capitalize, not uppercase, so your
> example should read like
>
> &lt;span style="text-transform: capitalize;"&gt;Jane Doe&lt;/span&gt;
>
> Of course you cannot use CSS for every purpose, but in most cases this will
> do the job.
>
> -- Alfred
>
>
> Göran Törnquist-2 wrote:
>  
>> Using css maybe better?
>>
>> &lt;span style="text-transform: uppercase;"&gt;Jane Doe&lt;/span&gt;
>>
>> /Göran
>>
>>
>>    
>
>  


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/