Front page | perl.perl6.language |
Postings from August 2006
Re: === and array-refs
Thread Previous
|
Thread Next
From:
Dr.Ruud
Date:
August 16, 2006 16:40
Subject:
Re: === and array-refs
Message ID:
20060816234019.29597.qmail@lists.develooper.com
Larry Wall schreef:
> Dr.Ruud:
>> Comparing strings in Perl5, using NFKD:
>>
>> perl5 -MUnicode::Normalize -we '
>> ($\, $,) = ("\n", "\t") ;
>> $x = qq{Henry IV} ;
>> $y = qq{Henry \x{2163}} ;
>> print qq{<$x>}, qq{<$y>}, length $x, length $y, $x eq $y ? 1 : 0 ;
>> # $x = NFKD $x ;
>> $y = NFKD $y ;
>> print qq{<$x>}, qq{<$y>}, length $x, length $y, $x eq $y ? 1 : 0 ;
>> '
>> Wide character in print at -e line 5.
>> <Henry IV> <Henry ?.?> 8 7 0
>> <Henry IV> <Henry IV> 8 8 1
>>
>>
>> How will the Str type do this?
>
> That'd just be:
>
> eqv($x, $y, :(NFKD $^s))
>
> [...]
Thanks. Is it also possible to define an NKFD_Str type so that you can
code C<$x === $y>, and the NKFD-stuff is done because of the type's
.SKID? (Can a "type" have a (type-wide) .SKID?)
--
Affijn, Ruud
"Gewoon is een tijger."
Thread Previous
|
Thread Next
-
===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by David Green
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Larry Wall
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Smylers
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Charles Bailey
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Jonathan Lang
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Darren Duncan
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Aaron Sherman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman