toggleFlag

fun Int.toggleFlag(flag: Int): Int

Returns this mask with every bit of flag inverted.

Applying the same flag twice restores the original mask.