#pragma once

bool string_in_string(const std::string test_string, const std::string main_string);
bool string_startswith(const std::string test_string, const std::string main_string);
bool string_endswith(const std::string test_string, const std::string main_string);

template <typename T> std::string to_string(const T i) { // convert something to string
	std::stringstream s;
	s << i;
	return s.str();
}
void find_and_replace(std::string& tInput, const std::string tFind, const std::string tReplace);
double string_to_double( const std::string& s );

void split_string(const std::string main_string, const std::string test_string, list<string>* result);
void trim_string(std::string* main_string);
void trim_string_list(list<string>* string_list);

bool string_to_number(const string str,    int* number);
bool string_to_number(const string str,  float* number);
bool string_to_number(const string str, double* number);
template <typename type_num> type_num string_to_number(const string str) {
	type_num num;
	to_number(str,num);
	return num;
}