MCASE$

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > String functions >

MCASE$

 

Description

 

Return a mixed case version of its string argument.

 

Syntax

 

s = MCASE$(string_expression)

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

String_Expression

String

No

Any string expression

 

Remarks

 

Restrictions
 

This function capitalizes the first letter of any word it finds, while forcing the remaining letters of given word to be lower case. The end of word is detected as any non-letter character, this is why the result for "isn't" will be "Isn'T" and not "Isn't".

 

See also

 

String Handling, LCASE$, UCASE$,

 

Examples

 

Thanks to Abraxas for the following script example

' Usage of the LCASE$ Keyword example

' Usage of the MCASE$ Keyword example

' Usage of the UCASE$ Keyword example

 

Dim MyOLDString   As String = "Hello world - GREAT day, isn't it?"

Dim MyLCASEString As String

Dim MyMCASEString As String

Dim MyUCASEString As String

Dim sMsg          As String

 

MyLCASEString = LCASE$(MyOLDString) 

MyMCASEString = MCASE$(MyOLDString) 

MyUCASEString = UCASE$(MyOLDString)

 

sMsg += "Normal " & MyOLDString   & $CRLF & $CRLF

sMsg += "LCASE$ " & MyLCASEString & $CRLF & $CRLF

sMsg += "MCASE$ " & MyMCASEString & $CRLF & $CRLF

sMsg += "UCASE$ " & MyUCASEString & $CRLF & $CRLF

 

MSGBOX 0, sMsg