Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Alexander Lapshin
common
Commits
1f8239bf
Commit
1f8239bf
authored
May 18, 2020
by
Alexander Lapshin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5f6d7696
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
TextFunctions.h
utils/TextFunctions.h
+15
-0
No files found.
utils/TextFunctions.h
View file @
1f8239bf
...
...
@@ -77,6 +77,21 @@ static std::string ToStr(const T arg)
return
""
;
}
static
std
::
string
ToStr
(
const
bool
arg
)
{
std
::
array
<
char
,
32
>
buf
;
const
auto
res
=
std
::
to_chars
(
buf
.
data
(),
buf
.
data
()
+
buf
.
size
(),
static_cast
<
int
>
(
arg
));
if
(
res
.
ec
==
std
::
errc
())
{
return
std
::
string
(
buf
.
data
(),
res
.
ptr
-
buf
.
data
());
}
hangle_to_chars_error
(
res
,
arg
);
return
""
;
}
// static std::string ToStr(const size_t arg)
// {
// std::array<char, 32> buf;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment