Loading...
Searching...
No Matches
ITHACAstring.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12
13License
14 This file is part of ITHACA-FV
15
16 ITHACA-FV is free software: you can redistribute it and/or modify
17 it under the terms of the GNU Lesser General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 ITHACA-FV is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU Lesser General Public License for more details.
25
26 You should have received a copy of the GNU Lesser General Public License
27 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
28\*---------------------------------------------------------------------------*/
29
30#ifndef ITHACAstring_H
31#define ITHACAstring_H
32
35
36#include "ITHACAparameters.H"
37
38
39
40namespace ITHACAutilities
41{
42
43//------------------------------------------------------------------------------
48std::string str_trim(std::string const& s);
49
50//------------------------------------------------------------------------------
55void str_format_io( std::string const& s, unsigned int Nmax );
56
57//------------------------------------------------------------------------------
61std::string double2ConciseString(const double& d);
62
63//------------------------------------------------------------------------------
68bool containsSubstring(std::string contain, std::string contained);
69
70//------------------------------------------------------------------------------
74std::vector<int> extractIntFromString(std::string input);
75
76};
77
78#endif
Namespace to implement some useful assign operation of OF fields.
std::string str_trim(std::string const &s)
Trim a string cf.
bool containsSubstring(std::string contain, std::string contained)
Returns true if contained is a substring of contain, false otherwise.
std::string double2ConciseString(const double &d)
Returns the double d in string format without keeping all the extra 0.
void str_format_io(std::string const &s, unsigned int nMax)
Format a string.
std::vector< int > extractIntFromString(std::string input)
Returns an array storing all the integers in the input string.