Skip to content

Commit

Permalink
Rename converter to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd committed Aug 17, 2024
1 parent 4ddc381 commit a14c9a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ package kotlinx.uuid
import kotlin.uuid.Uuid

/**
* Converts this [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value to a [kotlinx.uuid.UUID][UUID] value
* Converts this [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value to a [kotlin.uuid.UUID][Uuid] value
* by using the [UUIDString][platform.Foundation.NSUUID.UUIDString] representation.
*/
public fun platform.Foundation.NSUUID.toKotlinUUID(): Uuid = Uuid.parse(UUIDString)
public fun platform.Foundation.NSUUID.toKotlinUuid(): Uuid = Uuid.parse(UUIDString)

/**
* Converts this [kotlinx.uuid.UUID][UUID] value to a [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value
* Converts this [kotlin.uuid.Uuid][Uuid] value to a [platform.Foundation.NSUUID][platform.Foundation.NSUUID] value
* by using the default [toString] representation.
*/
public fun Uuid.toNsUUID(): platform.Foundation.NSUUID = platform.Foundation.NSUUID(toString())
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class NsUUIDConvertingTest {
@Test
fun fromNsUUID() {
val nsUUID = platform.Foundation.NSUUID(SOME_UUID_STRING)
val kotlinUUID = nsUUID.toKotlinUUID()
val kotlinUUID = nsUUID.toKotlinUuid()
assertEquals(SOME_UUID_STRING, kotlinUUID.toString())
}
}

0 comments on commit a14c9a3

Please sign in to comment.