Basic HTML version of Foils prepared Sept 20 97

Foil 49 Upper and Lower case Functions

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


We have learnt about \L (lower case characters until \E) and \l (lower case next character) and corresponding upper case \U \u so that
  • "\u\LfOX\E" is "Fox" etc. (\E optional here)
There are a set of function calls implementing these so that
lc(STRING) converts STRING to lower case
lcfirst(STRING) converts first character in STRING to lower case
uc and ucfirst play same role for upper case
ucfirst(lc 'fOX') returns 'Fox'



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 5 1998