Audacity
3.2.0
libraries
lib-string-utils
FromChars.h
Go to the documentation of this file.
1
/*!********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
@file FromChars.h
6
@brief Declare functions to convert numeric types to string representation.
7
8
Dmitry Vedenko
9
**********************************************************************/
10
11
#pragma once
12
13
#include <system_error>
14
16
struct
STRING_UTILS_API
FromCharsResult
final
17
{
18
const
char
*
ptr
;
19
23
std::errc
ec
;
24
};
25
27
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
float
& value)
noexcept
;
28
30
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
double
& value)
noexcept
;
31
33
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
short
& value)
noexcept
;
35
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
unsigned
short
& value)
noexcept
;
36
38
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
int
& value)
noexcept
;
40
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
unsigned
int
& value)
noexcept
;
41
43
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
long
& value)
noexcept
;
45
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
unsigned
long
& value)
noexcept
;
46
48
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
long
long
& value)
noexcept
;
50
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
unsigned
long
long
& value)
noexcept
;
52
STRING_UTILS_API
FromCharsResult
FromChars
(
const
char
* buffer,
const
char
* last,
bool
& value)
noexcept
;
FromChars
STRING_UTILS_API FromCharsResult FromChars(const char *buffer, const char *last, float &value) noexcept
Parse a string into a single precision floating point value, always uses the dot as decimal.
Definition:
FromChars.cpp:153
FromCharsResult
Result of the conversion, similar to std::from_chars_result.
Definition:
FromChars.h:17
FromCharsResult::ptr
const char * ptr
Definition:
FromChars.h:18
FromCharsResult::ec
std::errc ec
A pointer to the first character not matching the pattern.
Definition:
FromChars.h:23
Generated by
1.9.3