replacePlaceholders

fun replacePlaceholders(message: String, placeholders: Map<String, String>): String

Replaces placeholders in a message with the specified values. EG: replacePlaceholders("Hello, %name%!", mapOf("name" to "Spartacus04")) -> "Hello, Spartacus04!"

Return

The message with the placeholders replaced.

Parameters

message

The message to replace the placeholders in.

placeholders

The placeholders to replace.