| 
    VTK
    9.5.20251103
    
   | 
 
Optimized C++ utilities for formatting values to strings and files. More...
#include "vtkCharConvCompatibility.h"#include "vtkCommonCoreModule.h"#include "vtkLogger.h"#include "vtk_fmt.h"#include <VTK_FMT(fmt/args.h)>#include <VTK_FMT(fmt/chrono.h)>#include <VTK_FMT(fmt/compile.h)>#include <VTK_FMT(fmt/format.h)>#include <VTK_FMT(fmt/ranges.h)>#include <string>#include <string_view>Go to the source code of this file.
Namespaces | |
| namespace | vtk | 
| Specialization of tuple ranges and iterators for vtkAOSDataArrayTemplate.  | |
Macros | |
| #define | VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND(to_chars_result, value, command) | 
| #define | VTK_TO_CHARS_RESULT_IF_ERROR_BREAK(to_chars_result, value) VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND(to_chars_result, value, break) | 
| #define | VTK_TO_CHARS_RESULT_IF_ERROR_RETURN(to_chars_result, value, returnValue) VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND(to_chars_result, value, return returnValue) | 
Functions | |
| VTKCOMMONCORE_EXPORT bool | vtk::is_printf_format (const std::string &format) | 
| Check if the given string is a printf style format.   | |
| VTKCOMMONCORE_EXPORT std::string | vtk::printf_to_std_format (const std::string &printf_format) | 
| Convert a printf style format to a std::format style format.   | |
| template<typename T , typename = std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<T, bool>>> | |
| VTK_ALWAYS_INLINE auto | vtk::to_chars (char *first, char *last, const T &value, int base=10) -> std::to_chars_result | 
| Given a number, convert it to a string within char* first and char* last, and return a to_chars_result;.   | |
| template<typename T , typename = std::enable_if_t<std::is_floating_point_v<T>>> | |
| VTK_ALWAYS_INLINE auto | vtk::to_chars (char *first, char *last, const T &value, std::chars_format format) -> std::to_chars_result | 
| Given a number, convert it to a string within char* first and char* last, and return a to_chars_result;.   | |
| template<typename T , typename = std::enable_if_t<std::is_floating_point_v<T>>> | |
| VTK_ALWAYS_INLINE auto | vtk::to_chars (char *first, char *last, const T &value, std::chars_format format, int precision) -> std::to_chars_result | 
| Given a number, convert it to a string within char* first and char* last, and return a to_chars_result;.   | |
Optimized C++ utilities for formatting values to strings and files.
This header provides efficient, alternatives to common C/C++ string handling functions such as printf, strtol etc.
It includes utilities for converting strings to numbers and scanning values from strings and files.
Refer to the documentation for guidance on replacing standard C functions with their modern, type-safe counterparts provided here.
Definition in file vtkStringFormatter.h.
| #define VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND | ( | to_chars_result, | |
| value, | |||
| command | |||
| ) | 
Definition at line 169 of file vtkStringFormatter.h.
| #define VTK_TO_CHARS_RESULT_IF_ERROR_BREAK | ( | to_chars_result, | |
| value | |||
| ) | VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND(to_chars_result, value, break) | 
Definition at line 187 of file vtkStringFormatter.h.
| #define VTK_TO_CHARS_RESULT_IF_ERROR_RETURN | ( | to_chars_result, | |
| value, | |||
| returnValue | |||
| ) | VTK_TO_CHARS_RESULT_IF_ERROR_COMMAND(to_chars_result, value, return returnValue) | 
Definition at line 190 of file vtkStringFormatter.h.