Class InterpolatedString
Provides factory methods to create interpolated strings efficiently.
Inherited Members
Namespace: DotNext.Text
Assembly: DotNext.dll
Syntax
public static class InterpolatedString
Methods
| Edit this page View SourceInterpolate(MemoryAllocator<char>?, ref PoolingInterpolatedStringHandler)
Formats interpolated string as a rented buffer of characters.
Declaration
public static MemoryOwner<char> Interpolate(MemoryAllocator<char>? allocator, ref PoolingInterpolatedStringHandler handler)
Parameters
Type | Name | Description |
---|---|---|
MemoryAllocator<char> | allocator | The allocator of the interpolated string. |
PoolingInterpolatedStringHandler | handler | The interpolated string handler. |
Returns
Type | Description |
---|---|
MemoryOwner<char> | A buffer containing formatted string. |
Interpolate(MemoryAllocator<char>?, IFormatProvider?, ref PoolingInterpolatedStringHandler)
Formats interpolated string as a rented buffer of characters.
Declaration
public static MemoryOwner<char> Interpolate(MemoryAllocator<char>? allocator, IFormatProvider? provider, ref PoolingInterpolatedStringHandler handler)
Parameters
Type | Name | Description |
---|---|---|
MemoryAllocator<char> | allocator | The allocator of the interpolated string. |
IFormatProvider | provider | Optional formatting provider to be applied for each interpolated string argument. |
PoolingInterpolatedStringHandler | handler | The interpolated string handler. |
Returns
Type | Description |
---|---|
MemoryOwner<char> | A buffer containing formatted string. |