From 67a164537bce4a4bfe9f14c41193bfa3e130c569 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 15 Oct 2019 21:17:39 +0100 Subject: [PATCH] Fix issue #43 encodedOffset deprecated warning. Use utf16Offset(in:) instead. (#44) Thank you @verebes1 --- Sources/Swift-Big-Number-Core.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Swift-Big-Number-Core.swift b/Sources/Swift-Big-Number-Core.swift index 1ea346c..f80159f 100644 --- a/Sources/Swift-Big-Number-Core.swift +++ b/Sources/Swift-Big-Number-Core.swift @@ -2279,13 +2279,13 @@ public struct BDouble: if let bi = BInt(nStr) { self.init(bi, over: 1) } else { - if let exp = nStr.firstIndex(of: "e")?.encodedOffset + if let exp = nStr.firstIndex(of: "e")?.utf16Offset(in: nStr) { let beforeExp = String(Array(nStr)[..