Changeset 19424 for docs/Perl6/Spec
- Timestamp:
- 01/11/08 01:45:38 (11 months ago)
- Files:
-
- 1 modified
-
docs/Perl6/Spec/Functions.pod (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/Perl6/Spec/Functions.pod
r19300 r19424 13 13 Mark Stosberg <mark@summersault.com> 14 14 Date: 12 Mar 2005 15 Last Modified: 1 Jan 200816 Version: 1 515 Last Modified: 10 Jan 2008 16 Version: 16 17 17 18 18 This document attempts to document the list of builtin functions in Perl 6. … … 1113 1113 until there is no further work to be done. 1114 1114 1115 =item samecase 1116 1117 our Str multi method samecase ( Str $string: Str $pattern ) is export 1118 1119 Has the effect of making the case of the string match the case pattern in C<$pattern>. 1120 (Used by s:ii/// internally, see L<S05>.) 1121 1122 =item samebase 1123 1124 our Str multi method samebase ( Str $string: Str $pattern ) is export 1125 1126 Has the effect of making the case of the string match the accent pattern in C<$pattern>. 1127 (Used by s:bb/// internally, see L<S05>.) 1128 1115 1129 =item capitalize 1116 1130 … … 1124 1138 1125 1139 This word is banned in Perl 6. You must specify units. 1140 1141 =item chars 1142 1143 our Int multi method chars ( Str $string: ) is export 1144 1145 Returns the number of characters in the string in the current 1146 (lexically scoped) idea of what a normal character is, usually graphemes. 1147 1148 =item graphs 1149 1150 our Int multi method codes ( Str $string: ) is export 1151 1152 Returns the number of graphemes in the string in a language-independent way. 1153 1154 =item codes 1155 1156 our Int multi method codes ( Str $string: $nf = "C") is export 1157 1158 Returns the number of codepoints in the string if it were canonicalized the 1159 specified way. Do not confuse codepoints with UTF-16 encoding. Characters 1160 above U+FFFF count as a single codepoint. 1161 1162 =item bytes 1163 1164 our Int multi method bytes ( Str $string: $nf = "C", $enc = "UTF-8") is export 1165 1166 Returns the number of bytes in the string if it were encoded in the 1167 specified way. Note the inequality: 1168 1169 .bytes("C","UTF-16") * 2 >= .codes("C") 1170 1171 This is caused by the possibility of surrogate pairs, which are counted as one 1172 codepoint. However, this problem does not arise for UTF-32: 1173 1174 .bytes("C","UTF-32") * 4 == .codes("C") 1126 1175 1127 1176 =item index
