Created
April 30, 2025 21:34
-
-
Save jacobsapps/6efc007e6cf0e3c6a531893d37c03641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
withUnsafeTemporaryAllocation(of: UInt8.self, capacity: size) { tempBuffer in | |
for i in 0..<tempBuffer.count { | |
tempBuffer[i] = UInt8(i * 2) | |
} | |
for byte in tempBuffer { | |
print(byte) // 0, 2, 4, 6, 8, 10, 12, 14 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment