StringTools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Case Conversion : StringTools/LowerCase

StringTools

  

LowerCase

  

change each alphabetic character in a string to lowercase

  

UpperCase

  

change each alphabetic character in a string to uppercase

  

OtherCase

  

change each alphabetic character in a string to the alternate case

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

LowerCase( s, rng )

UpperCase( s, rng )

OtherCase( s, rng )

Parameters

s

-

Maple string

rng

-

(optional) integer range

Description

• 

The LowerCase(s) calling sequence changes each alphabetic character in the string s to lowercase and returns the result in a new string. The string s remains unchanged.

• 

The UpperCase(s) calling sequence changes each alphabetic character in the string s to uppercase and returns the result in a new string. The string s remains unchanged.

• 

The OtherCase(s) calling sequence changes each alphabetic character in the string s to the opposite case and returns the result in a new string. The string s remains unchanged.

• 

See StringTools[IsLower] and StringTools[IsUpper] for definitions of lower and uppercase characters.

• 

These commands all accept an optional, second argument rng, a range that specifies a substring of the input s to be affected by the operation. Only characters within the given range are changed.

Examples

withStringTools:

LowerCase

(1)

LowerCaseABC

abc

(2)

LowerCaseABC;!def

abc;!def

(3)

LowerCaseImpedance of Free Space

impedance of free space

(4)

LowerCaseABCDEFGHIJ,3..8

ABcdefghIJ

(5)

UpperCase

(6)

UpperCaseabc

ABC

(7)

UpperCaseabc;!DEF

ABC;!DEF

(8)

UpperCaseTotally Random

TOTALLY RANDOM

(9)

UpperCaseabcdefghij,3..2

abCDEFGHIJ

(10)

OtherCase

(11)

OtherCaseabc

ABC

(12)

OtherCaseDEF

def

(13)

OtherCaseabc;DEF

ABC;def

(14)

OtherCaseThe Higher, The Fewer!

tHE hIGHER, tHE fEWER!

(15)

Note that LowerCase and UpperCase are not mutual inverses.

sLowerCaseabcDEF

s:=abcdef

(16)

UpperCases

ABCDEF

(17)

However, LowerCase(UpperCase(Lowercase(s))) = LowerCase(s) for every s.

LowerCaseUpperCaseLowerCaseabcDEF

abcdef

(18)

The OtherCase command is an involution.

OtherCaseOtherCaseabcDEF

abcDEF

(19)

See Also

string

StringTools

StringTools[Capitalize]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam