parseBoolean

suspend fun String.parseBoolean(context: CommandContext): Boolean?

Parse a string into a boolean, based on the context's detected locale.

This function uses a full match based on whatever is specified in the translations, lower-cased.

  • utils.string.false for false values

  • utils.string.true for true values

Translations may contain commas, in which case any of the given values will be suitable.


Parse a string into a boolean, based on the provided locale object.

This function uses a full match based on whatever is specified in the translations, lower-cased.

  • utils.string.false for false values

  • utils.string.true for true values

Translations may contain commas, in which case any of the given values will be suitable.