AsMemory()
System::MemoryExtensions::AsMemory(const System::String&) function
Creates a read-only memory from a string.
ReadOnlyMemory<char16_t> System::MemoryExtensions::AsMemory(const System::String &text)
Arguments
| Parameter | Type | Description |
|---|---|---|
| text | const System::String& | The source string. |
Return Value
ReadOnlyMemory<char16_t> covering the specified portion of the string.
Remarks
On C++ side this will be copy of string contents, not slice of existing string.
System::MemoryExtensions::AsMemory(const System::String&, int32_t) function
Creates a read-only memory from a string slice.
ReadOnlyMemory<char16_t> System::MemoryExtensions::AsMemory(const System::String &text, int32_t start)
Arguments
| Parameter | Type | Description |
|---|---|---|
| text | const System::String& | The source string. |
| start | int32_t | The starting index in the string. |
Return Value
ReadOnlyMemory<char16_t> covering the specified portion of the string.
System::MemoryExtensions::AsMemory(const System::String&, int32_t, int32_t) function
Creates a read-only memory from a string slice.
ReadOnlyMemory<char16_t> System::MemoryExtensions::AsMemory(const System::String &text, int32_t start, int32_t length)
Arguments
| Parameter | Type | Description |
|---|---|---|
| text | const System::String& | The source string. |
| start | int32_t | The starting index in the string. |
| length | int32_t | The length of the memory slice. |
Return Value
ReadOnlyMemory<char16_t> covering the specified portion of the string.
System::MemoryExtensions::AsMemory(const ArrayPtr<T>&) function
Creates a mutable memory from an array.
template<typename T> Memory<T> System::MemoryExtensions::AsMemory(const ArrayPtr<T> &array)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the array. |
Arguments
| Parameter | Type | Description |
|---|---|---|
| array | const ArrayPtr<T>& | The source array. |
Return Value
Memory
System::MemoryExtensions::AsMemory(const ArrayPtr<T>&, int32_t) function
Creates a mutable memory from an array slice.
template<typename T> Memory<T> System::MemoryExtensions::AsMemory(const ArrayPtr<T> &array, int32_t start)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the array. |
Arguments
| Parameter | Type | Description |
|---|---|---|
| array | const ArrayPtr<T>& | The source array. |
| start | int32_t | The starting index in the array. |
Return Value
Memory
System::MemoryExtensions::AsMemory(const ArrayPtr<T>&, int32_t, int32_t) function
Creates a mutable memory from an array slice.
template<typename T> Memory<T> System::MemoryExtensions::AsMemory(const ArrayPtr<T> &array, int32_t start, int32_t length)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the array. |
Arguments
| Parameter | Type | Description |
|---|---|---|
| array | const ArrayPtr<T>& | The source array. |
| start | int32_t | The starting index in the array. |
| length | int32_t | The length of the memory slice. |
Return Value
Memory
System::MemoryExtensions::AsMemory(const ArraySegment<T>&) function
Creates a mutable memory from an array segment.
template<typename T> Memory<T> System::MemoryExtensions::AsMemory(const ArraySegment<T> &segment)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the array. |
Arguments
| Parameter | Type | Description |
|---|---|---|
| segment | const ArraySegment<T>& | The source array segment. |
Return Value
Memory
System::MemoryExtensions::AsMemory(const ArrayPtr<T>&, const Range&) function
Creates a mutable memory from a range within an array.
template<typename T> Memory<T> System::MemoryExtensions::AsMemory(const ArrayPtr<T> &array, const Range &range)
Template parameters
| Parameter | Description |
|---|---|
| T | The type of elements in the array. |
Arguments
| Parameter | Type | Description |
|---|---|---|
| array | const ArrayPtr<T>& | The source array. |
| range | const Range& | The range of elements to include in the memory. |
Return Value
Memory
See Also
- Typedef ArrayPtr
- Class ReadOnlyMemory
- Class String
- Class Memory
- Class ArraySegment
- Class Range
- Namespace System::MemoryExtensions
- Library Aspose.Slides