Currently searching for quick pointers.
UnsafePointerand UnsafeMutablePointerprovide a pointer to a byte. Using pointer arithmetic, you can access the rest of the bytes.
UnsafePointer
UnsafeMutablePointer
Something similar can be done with the help UnsafeMutableBufferPointerthat has the endIndex parameter. So, what is the advantage / difference of using UnsafeMutableBufferPointerover UnsafeMutablePointerwhen accessing, for example, bytes in NSData?
UnsafeMutableBufferPointer
NSData
UnsafeMutablePointer<T>designed to access a single type element T. Its interface is designed to access a single scalar value.
UnsafeMutablePointer<T>
T
UnsafeMutableBufferPointer<T>, , T, . , (, generate).
UnsafeMutableBufferPointer<T>
generate
NSData, UnsafePointer , . , UnsafeBufferPointer, , .
UnsafeBufferPointer
Source: https://habr.com/ru/post/1598578/More articles:JPanel - Problems replacing the currently displayed image with a new thumbnail - javaAs for the floating point flag used when compiling the application for the purpose of the hand - cSlim 3 autoloader - phpget cmdline of a process in MAC os from another C executable - system-callsVectorizing the install_github function from devtools to R - githubWhy toList () doesn't exist directly on Java 8 Stream - javaggplot2: how to create the right legend after using scale_xx_manual - rHow can I safely use JSON.parse for a string object, which can be a simple string or a string object? - jsonСоставляют ли компиляторы простые функции с постоянными аргументами в уникальные инструкции? - c++Laravel 5.1 Mailer Attempting to get property of no object - phpAll Articles