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
2704d938
Commit
2704d938
authored
Jan 30, 2020
by
Alexander Lapshin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0969b9b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
TextFunctions.h
utils/TextFunctions.h
+9
-8
No files found.
utils/TextFunctions.h
View file @
2704d938
...
...
@@ -35,6 +35,15 @@ static std::string ToStr(double arg)
return
ss
.
str
();
}
static
std
::
string
ToStr
(
double
value
,
int
precision
)
{
std
::
ostringstream
ss
;
ss
<<
std
::
setprecision
(
precision
);
ss
<<
value
;
return
ss
.
str
();
}
static
void
string_replace
(
std
::
string
&
str
,
const
std
::
string
&
from
,
const
std
::
string
&
to
)
{
if
(
from
.
empty
())
...
...
@@ -46,14 +55,6 @@ static void string_replace(std::string& str, const std::string& from, const std:
}
}
static
std
::
string
ToStr
(
double
value
,
int
precision
)
{
std
::
ostringstream
ss
;
ss
<<
std
::
setprecision
(
precision
);
ss
<<
value
;
return
ss
.
str
();
}
static
std
::
string
trim_right
(
const
std
::
string
&
s
,
const
std
::
string
&
t
=
SPACES
)
{
std
::
string
d
(
s
);
...
...
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