All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.ktor.websocket.Utils.kt Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
/*
* Copyright 2014-2021 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("UtilsKt")

package io.ktor.websocket

@Suppress("NOTHING_TO_INLINE")
internal inline infix fun Byte.xor(other: Byte) = toInt().xor(other.toInt()).toByte()

@Suppress("NOTHING_TO_INLINE")
internal inline fun Boolean.flagAt(at: Int) = if (this) 1 shl at else 0




© 2015 - 2024 Weber Informatics LLC | Privacy Policy