checkTag

@JvmStatic
fun checkTag(tag: String?): String(source)

Checks a String for validity of use as a Logger.tag value.

A valid tag complies with the following parameters:

  • Is not null.

  • Is greater than or equal to 1 character in length (i.e. is not empty).

  • Is less than or equal to 128 characters in length.

  • Does not contain whitespace.

    • e.g. Invalid >>My Tag

    • e.g. Invalid >>My\nTag

Return

The non-null tag

Throws

IllegalArgumentException

If tag is invalid.

NullPointerException

If tag is null.