Documentation Center

  • Trial Software
  • Product Updates

stringlib::upper

Convert to upper-case

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

stringlib::upper(string1)

Description

stringlib::upper(string1) converts each lower-case letter in the string string1 to upper-case. All other characters remains unchanged.

If the string contains no lower-case letters, the given string is returned unchanged.

Examples

Example 1

Convert a string to upper-case:

stringlib::upper("MuPAD"),
stringlib::upper("Mupad"),
stringlib::upper("MUPAD"),
stringlib::upper("mupad")

Example 2

Compare strings not case sensitive:

str_eq:= (str1, str2) ->
           bool(stringlib::upper(str1) = stringlib::upper(str2)):
str_eq("MuPAD", "mupad"), str_eq("Mupad", "MUPAD")

Parameters

string1

Any string

Return Values

String

See Also

MuPAD Functions

Was this topic helpful?