adjustTag

fun adjustTag(tag: String, prefix: String = "#"): String

Adjusts the provided tag to make it suitable for use in the Clash of Clans API.

Example usage:

val adjusted = adjustTag("1     2   3 AB  c   d")
// adjusted will be: "#123ABCD"

Return

The adjusted tag with the prefix.

Parameters

tag

The tag string to be adjusted.

prefix

The optional prefix to be added to the adjusted tag. Default is "#."