---
title: "System::Buffers::Text::Utf8Formatter::TryFormat method"
url: "https://reference.aspose.com/pdf/cpp/system.buffers.text/utf8formatter/tryformat/"
product: "Aspose.PDF for C++ API Reference"
description: "How to use TryFormat method of System::Buffers::Text::Utf8Formatter class in C++."
---

## Utf8Formatter::TryFormat(const DateTime\&, Span\<uint8_t\>, int32_t\&, const StandardFormat\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const DateTime &value, Span<uint8_t> destination, int32_t &bytesWritten, const StandardFormat &format)
```

## See Also

* Class [DateTime](../../../system/datetime/)
* Class [Span](../../../system/span/)
* Class [StandardFormat](../../../system.buffers/standardformat/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(const DateTimeOffset\&, Span\<uint8_t\>, int32_t\&, const StandardFormat\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const DateTimeOffset &value, Span<uint8_t> destination, int32_t &bytesWritten, const StandardFormat &format)
```

## See Also

* Class [DateTimeOffset](../../../system/datetimeoffset/)
* Class [Span](../../../system/span/)
* Class [StandardFormat](../../../system.buffers/standardformat/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(const Decimal\&, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const Decimal &value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Decimal](../../../system/decimal/)
* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(const Guid\&, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const Guid &value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Guid](../../../system/guid/)
* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(const TimeSpan\&, Span\<uint8_t\>, int32_t\&, char_t) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const TimeSpan &value, Span<uint8_t> destination, int32_t &bytesWritten, char_t format)
```

## See Also

* Class [TimeSpan](../../../system/timespan/)
* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(const TimeSpan\&, Span\<uint8_t\>, int32_t\&, const StandardFormat\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(const TimeSpan &value, Span<uint8_t> destination, int32_t &bytesWritten, const StandardFormat &format)
```

## See Also

* Class [TimeSpan](../../../system/timespan/)
* Class [Span](../../../system/span/)
* Class [StandardFormat](../../../system.buffers/standardformat/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(double, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(double value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(float, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(float value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(int32_t, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(int32_t value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(int64_t, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(int64_t value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(uint32_t, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(uint32_t value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(uint64_t, Span\<uint8_t\>, int32_t\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(uint64_t value, Span<uint8_t> destination, int32_t &bytesWritten)
```

## See Also

* Class [Span](../../../system/span/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
## Utf8Formatter::TryFormat(uint8_t, Span\<uint8_t\>, int32_t\&, const StandardFormat\&) method




```cpp
static bool System::Buffers::Text::Utf8Formatter::TryFormat(uint8_t value, Span<uint8_t> destination, int32_t &bytesWritten, const StandardFormat &format)
```

## See Also

* Class [Span](../../../system/span/)
* Class [StandardFormat](../../../system.buffers/standardformat/)
* Class [Utf8Formatter](../)
* Namespace [System::Buffers::Text](../../)
* Library [Aspose.PDF for C++](../../../)
