
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] filter last name
thanks Jonathan!
on 8/31/01 12:22 PM, Jonathan Clark at jonc@webmaint.com wrote:
> [value name=lname filter=uc]
returns WATTS
[value name=lname filter="uc 3"]
returns WAT
on 8/31/01 12:22 PM, Jonathan Clark at jonc@webmaint.com wrote:
>
>> I want to use just the first 3 letters of the users last name and make it
>> all uppercase
>>
>> I've tried just to set it to uppercase with
>>
>> [filter uc][value lname][/filter]
>>
>> but tht does not work just to change it to all UC
>>
>
> what about [value name=lname filter=uc]
>
> you can create your own filter by adding the following to interchange.cfg
> (if my perl is any good):
>
> GlobalSub <<EOR
> sub new_filter {
> BEGIN {
> package Vend::Interpolate;
> $Filter{first_three_uc} = sub
>
> my $val = shift;
> $val = uc($val);
> $val = substr($val,0,3);
> return $val;
> };
> } # close BEGIN
> }
> EOR
>
> and then use [value name=lname filter=first_three_uc]
>
> Filters are great!
>
> Jonathan
> Webmaint.
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users