Skip to content

Commit 7b15f49

Browse files
Improve documentation for unsigned operations (#104)
1 parent 2b54f00 commit 7b15f49

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

core/commonMain/src/kotlinx/io/OutputOperations.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import kotlinx.io.buffer.*
44
import kotlin.math.*
55

66
/**
7-
* Writes the unsigined byte [value] to this [Input].
7+
* Writes the unsigned byte [value] to this [Input].
88
*/
99
@ExperimentalUnsignedTypes
1010
public fun Output.writeUByte(value: UByte): Unit = writeByte(value.toByte())

core/commonMain/src/kotlinx/io/buffer/PrimitivesOperations.common.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,28 +192,28 @@ public fun Buffer.storeLongAt(offset: Int, value: Long, byteOrder: ByteOrder) {
192192
public expect fun Buffer.storeLongAt(offset: Long, value: Long)
193193

194194
/**
195-
* Read short signed 64-bit integer in the network byte order (Big Endian).
195+
* Read short unsigned 64-bit integer in the network byte order (Big Endian).
196196
* May throw [IndexOutOfBoundsException] if given [offset] is negative or greater than buffer size.
197197
*/
198198
@ExperimentalUnsignedTypes
199199
public inline fun Buffer.loadULongAt(offset: Int): ULong = loadLongAt(offset).toULong()
200200

201201
/**
202-
* Read short signed 64-bit integer in the network byte order (Big Endian).
202+
* Read short unsigned 64-bit integer in the network byte order (Big Endian).
203203
* May throw [IndexOutOfBoundsException] if given [offset] is negative or greater than buffer size.
204204
*/
205205
@ExperimentalUnsignedTypes
206206
public inline fun Buffer.loadULongAt(offset: Long): ULong = loadLongAt(offset).toULong()
207207

208208
/**
209-
* Write short signed 64-bit integer in the network byte order (Big Endian).
209+
* Write short unsigned 64-bit integer in the network byte order (Big Endian).
210210
* May throw [IndexOutOfBoundsException] if given [offset] is negative or greater than buffer size.
211211
*/
212212
@ExperimentalUnsignedTypes
213213
public inline fun Buffer.storeULongAt(offset: Int, value: ULong): Unit = storeLongAt(offset, value.toLong())
214214

215215
/**
216-
* Write short signed 64-bit integer in the network byte order (Big Endian).
216+
* Write short unsigned 64-bit integer in the network byte order (Big Endian).
217217
* May throw [IndexOutOfBoundsException] if given [offset] is negative or greater than buffer size.
218218
*/
219219
@ExperimentalUnsignedTypes

0 commit comments

Comments
 (0)