to_upper(+term)

This string predicate converts a string expression to an uppercase string. The predicate can only be used in a string expression.

see also: &/2 delete/3 expand_sq/1insert/3 is/2 replace/3 substring/3 string_list/2 to_lower/1 to_prolog/1 to_string/1 to_string/2  trim/1 triml/1 trimr/1 working with strings

Examples
X is_string to_upper('abcd'). variable X is unified with the string "ABCD"

 

Exceptions
The  parameter is an empty variable an instantiation_error exception is thrown
The parameter is a floating-point number a type_error(callable, Arg) exception is thrown and Arg is replaced by the value of the parameter

 

 

info@trinc-prolog.com