We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b6d55b commit 114c308Copy full SHA for 114c308
lib/Language/traps.pod
@@ -201,6 +201,26 @@ last element of an array becomes:
201
my @array = qw{victor alice bob charlie eve};
202
say @array[*-1]; #=> eve
203
204
+=head1 Strings
205
+
206
+=head2 Capitalizing a string
207
208
+In Perl 5 one could capitalize a string by using the C<ucfirst> function
209
210
+ say ucfirst "alice"; #=> Alice
211
212
+The C<ucfirst> function does not exist in Perl 6; one needs to use the
213
+C<tclc> method:
214
215
+ say "alice".tclc; #=> Alice
216
217
+which is equivalent to
218
219
+ say tclc "alice"; #=> Alice
220
221
+Here, C<tclc> means "title case for the first character, lower case for the
222
+remaining characters".
223
224
=end pod
225
226
# vim: expandtab shiftwidth=4 ft=perl6
0 commit comments