-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextFunctions.h
28 lines (26 loc) · 950 Bytes
/
TextFunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Created by shachar Meir on 09/01/2020.
//
#ifndef FLIGHT_SIMULATOR__TEXTFUNCTIONS_H_
#define FLIGHT_SIMULATOR__TEXTFUNCTIONS_H_
#include <vector>
#include <string>
#include <iostream>
//functions to help manage operations on strings
void replace(char token1,const std::string & token2, std::string& str);
void remove_redundant_signs(std::string& str);
void remove_spaces(std::string& str);
void remove_quotation(std::string& str);
std::vector<std::string> split(char token, std::string& str);
void strip(std::string& str);
bool isVar(std::string& str);
bool isInQuotations(std::string& str);
bool isAssign(std::string& str);
bool isCondition(std::string& str);
bool isLogicOperator(std::string &str);
bool isOpenDataServer(std::string &str);
bool isConnectControlClient(std::string &str);
bool isPrint(std::string &str);
bool isSleep(std::string &str);
void makeConditionBetSpaces(std::string &s);
#endif //FLIGHT_SIMULATOR__TEXTFUNCTIONS_H_