PRISM
 v0.0.0
Loading...
Searching...
No Matches
StringHelper.h
1#pragma once
2
3#include <string>
4#include <vector>
5#include <utility>
6
7namespace prism
8{
14void ltrim(std::string & s);
15
21void rtrim(std::string & s);
22
28void trim(std::string & s);
29
39std::vector<std::string> splitByDelimiter(const std::string & s, const std::string & d);
40
47int findFirstCapital(const std::string & s);
48
55int findFirstSpecial(const std::string & s);
56
63int findFirstNonLetter(const std::string & s);
64
71int findFirstLetter(const std::string & s);
72
79int findFirstNonNumber(const std::string & s);
80
87int findFirstNumber(const std::string & s);
88
95int findFirstNonSpecial(const std::string & s);
96
103std::vector<std::string> splitByCapital(const std::string & s);
104
105std::string formatScientific(const float val);
106
112void printGreen(const std::string & s);
113
119void printRed(const std::string & s);
120
127std::string makeGreen(const std::string & s);
128
135std::string makeRed(const std::string & s);
136
144std::vector<std::vector<double>>
145readDataFromFile(const std::string & file, const std::string & delimiter, const unsigned int num_columns);
146}