String case: Difference between revisions
Changed task description, modified all code examples to suit.
(Changed task description, modified all code examples to suit.) |
|||
Line 1:
{{task}}
Take the string "alphaBETA", and demonstrate how to convert it to UPPER-CASE and lower-case.
==[[Ada]]==
Line 18 ⟶ 19:
[[Category:Forth]]
create s ,"
s count type \ shows:
s count 2dup upper type \ shows:
s count 2dup lower type \ shows:
==[[JavaScript]]==
[[Category:JavaScript]]
alert( "
alert( "alphaBETA".toLowerCase() );
Output:
ALPHABETA
alphabeta
==[[Perl]]==
Line 35 ⟶ 38:
'''Interpreter:''' [[Perl]] v5.x
my $string =
my $uppercase = uc($string);
my $lowercase = lc($string);
==[[Python]]==
Line 41 ⟶ 47:
s = "alphaBETA"
print s.upper
print s.lower()
==[[SQL]]==
|