From a6c396271539166601adea59b603cbe564db004e Mon Sep 17 00:00:00 2001 From: Joel Gerber Date: Sun, 28 May 2017 20:34:56 -0400 Subject: [PATCH] Reference SPM support --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c7704d..f6ce46d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,15 @@ native unsigned integer types support. [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +## Installation +This library includes Carthage and SPM support out of the box. Reference this git +repository in a Cartfile or Package.swift file in order to easily include this library +while also being able to easily track changes. + +You can also manually copy over the Sources/UInt128.swift file into your project and +it should work great. I've purposely kept this library constrained to a single file in +order to support this use case. + ## Usage Since this library fully implements the UnsignedInteger protocol, you can use this data type just like any other native UInt data type. For numbers larger than UIntMax, you'll @@ -12,7 +21,8 @@ either want to call the `init(upperBits: UInt64, lowerBits: UInt64)` initializer use the `init(stringLiteral: String)` initializer to create an instance with a string. The string can be in binary, octal, decimal or hexadecimal. -## Example +For example: + let uInt128ByString: UInt128 = "0xffaabbcc00129823fa9a12d4aa87f498" let uInt128ByInteger: UInt128 = 1234