Return formatted message

@return {string}
421438
function () {
        var prefix = '%(',
            suffix = ')',
            data = this.data,
            output = '',
            dataKey;

        output = this.__message__;
        for (dataKey in data) {

            if (data.hasOwnProperty(dataKey)) {
                output = output.replace(prefix + dataKey + suffix, '' + data[dataKey]);
            }
        }
        output = output.replace(prefix + 'code' + suffix, '' + this.code);
        output = output.replace(prefix + 'name' + suffix, '' + this.name);

        return output;
    }
555629
public function getMessage() : ?string 
    {
        if ( ! $this->hasMessage()) {
            $this->setMessage($this->getDefaultMessage());
        }
        return $this->message;
    }
720720
function parseMessage(line) { // {{{
  var message = {};
  var match;

  // Parse prefix
  if (match = line.match(/^:([^ ]+) +/)) {
    message.prefix = match[1];
    line = line.replace(/^:[^ ]+ +/, '');
    if (match = message.prefix.match(/^([_a-zA-Z0-9\[\]\\`^{}|-]*)(!([^@]+)@(.*))?$/)) {
      message.nick = match[1];
      message.user = match[3];
      message.host = match[4];
    }
    else
      message.server = message.prefix;
  }

  // Parse command
  match = line.match(/^([^ ]+) +/);
  message.command = match[1];
  message.rawCommand = match[1];
  message.commandType = 'normal';
  line = line.replace(/^[^ ]+ +/, '');

  if (replyFor[message.rawCommand]) {
    message.command     = replyFor[message.rawCommand].name;
    message.commandType = replyFor[message.rawCommand].type;
  }

  message.args = [];
  var middle, trailing;

  // Parse parameters
  if (line.indexOf(':') != -1) {
    var index = line.indexOf(':');
    middle = line.substr(0, index).replace(/ +$/, "");
    trailing = line.substr(index+1);
  } else
    middle = line;

  if (middle.length)
    message.args = middle.split(/ +/);

  if (typeof(trailing) != 'undefined' && trailing.length)
    message.args.push(trailing);

  return message;
}
707775
public String getFormattedMessage(String messageKey, Object[] param, String defaultKey) {
		String key = getString(messageKey);
		String retVal = MessageFormat.format(key, param);
		return retVal;
	}
138821
public function get_formatted_description() {
        if (!isset($this->definition->description)) {
            return '';
        }
        return format_text($this->definition->description, $this->definition->descriptionformat);
    }
1174035
function formatMessage(message, parentResult) {
    const type = (message.fatal || message.severity === 2) ? chalk.red("error") : chalk.yellow("warning");
    const msg = `${chalk.bold(message.message.replace(/([^ ])\.$/u, "$1"))}`;
    const ruleId = message.fatal ? "" : chalk.dim(`(${message.ruleId})`);
    const filePath = formatFilePath(parentResult.filePath, message.line, message.column);
    const sourceCode = parentResult.output ? parentResult.output : parentResult.source;

    const firstLine = [
        `${type}:`,
        `${msg}`,
        ruleId ? `${ruleId}` : "",
        sourceCode ? `at ${filePath}:` : `at ${filePath}`
    ].filter(String).join(" ");

    const result = [firstLine];

    if (sourceCode) {
        result.push(
            codeFrameColumns(sourceCode, { start: { line: message.line, column: message.column } }, { highlightCode: false })
        );
    }

    return result.join("\n");
}
319696
function MessageFormatter() {
  this.format = format;
  function format(result) {
    _.each(result, function(message) {
      console.log(message);
    });
  }
}
224865
public function format()
    {
        if ($this->getMessage() == '' || !$this->getMessage()) {
            return '';
        }

        if (count($this->bindings) > 0) {
            foreach ($this->bindings as $token => $value) {
                $this->message = str_replace($this->delimiter . $token, $value, $this->message);
            }
        }

        return $this->message;
    }
739651
function getTrueMsg (msg) {
  if (msg) return msg
  msg = msg || ''
  if (terst.autoMsg === true) { //experimental
    var params = getParams(T)
    for (var i = 0 ; i < params.length; ++i) {
      try {
        var e = eval(params[i].param)
      } catch (err) {
        console.error(err)
      }
      if (typeof e === 'boolean' && e === false) {
        msg = params[i].param
        return msg
      } 
    }
  }
}
629577
private function _getMessage() {
		set_error_handler(array(
			$this,
			'_messageErrorHandler'
		), E_ALL);

		$args = func_get_args();
		if (isset($this->messages[$args[0]])) {
			$msg = $this->messages[$args[0]];

			try {
				array_shift($args);
				$formattedMsg = vsprintf($msg, $args);
			} catch (Exception $e) {
				$formattedMsg = $msg;
			}

			set_error_handler(array(
				$this,
				'customErrorHandler'
			), E_ALL);

			return $formattedMsg;
		}

		return FALSE;
	}
1159216
public function getFullMessage(): string {
        $paras = [];

        if (!empty($this->getMainMessage())) {
            $paras[] = $this->getMainMessage();
        } elseif ($this->getErrorCount() === 0) {
            return '';
        }

        if (isset($this->errors[''])) {
            $paras[] = $this->formatErrorList('', $this->errors['']);
        }

        foreach ($this->errors as $field => $errors) {
            if ($field === '') {
                continue;
            }
            $paras[] = $this->formatErrorList($field, $errors);
        }

        $result = implode("\n\n", $paras);
        return $result;
    }
312417
public String getMessage()
    {
        String.format("Wrong Syntax for [%s]: %s", name,message);
        return  String.format("Wrong Syntax for [%s]: %s", name,message);
    }
1354193
def message(self):
        
        message = self.description.format(**self.parameters)
        return '{code} {message}'.format(code=self.code, message=message)
350794
@Override
    public String getFormattedMessage() {
        if (formattedMessage == null) {
            if (message == null) {
                message = getMessage(messagePattern, argArray, throwable);
            }
            formattedMessage = message.getFormattedMessage();
        }
        return formattedMessage;
    }
1160071
function () {
    var text = ''
    var regx = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
    for (var idx = 0; idx < 8; idx++) {
      text = text + regx.charAt(Math.floor(Math.random() * regx.length))
    }
    return text
  }
1047033
public String format() {
        String result = message;
        for (Object object : objects) {
            String s = result.replaceFirst("%%", Matcher.quoteReplacement(stringify(object)));
            if (result.equals(s)) {
                throw new IllegalStateException("Too many parameters");
            }
            result = s;
        }
        if (result.contains("%%")) {
            throw new IllegalStateException("Not enough parameters");
        }
        return result;
    }
8495
@Override
	public String getFormattedMessage() {
		String result = localizedMessage==null ? rawMessage : localizedMessage;
		if (parameters != null) {
			try {
				return MessageFormat.format(result, parameters);
			} catch (IllegalArgumentException iae) {
				// In case of problem with positional parameters fall through and
				// return unformatted string.
			}
		}
		return result;
	}