blob: ea7fb8980a16f9179d117c2245df866206297935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/*
* SPDX-FileCopyrightText: 2023 Linnea Gräf <nea@nea.moe>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package moe.nea.firmament.util
import java.math.BigInteger
import java.util.UUID
fun parseDashlessUUID(dashlessUuid: String): UUID {
val most = BigInteger(dashlessUuid.substring(0, 16), 16)
val least = BigInteger(dashlessUuid.substring(16, 32), 16)
return UUID(most.toLong(), least.toLong())
}
|