Revision 27098

Date:
2009/06/16 20:37:03
Author:
lwall
Revision Log:
[S32/Str] old thinko on the inequalities
Files:

Legend:

 
Added
 
Removed
 
Modified
  • docs/Perl6/Spec/S32-setting-library/Str.pod

     
    229 229 Returns the number of bytes in the string if it were encoded in the
    230 230 specified way. Note the inequality:
    231 231
    232 .bytes("UTF-16","C") * 2 >= .codes("C")
    232 .bytes("UTF-16","C") >= .codes("C") * 2
    233 233
    234 234 This is caused by the possibility of surrogate pairs, which are counted as one
    235 235 codepoint. However, this problem does not arise for UTF-32:
    236 236
    237 .bytes("UTF-32","C") * 4 == .codes("C")
    237 .bytes("UTF-32","C") == .codes("C") * 4
    238 238
    239 239 =item encode
    240 240