paint_string Function

public pure function paint_string(msg, colour) result(msg_painted)

Subroutine to paint a given string to the desired colour, returns a new string with ANSI escape sequences prepended and appended. If the 'colour' argument is not known, simply returns the string itself.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: msg

message to print to the console

character(len=*), intent(in) :: colour

colour of the message

Return Value character,allocatable

new string with ANSI sequences added


Contents

None