-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelpingFunc.h
39 lines (38 loc) · 901 Bytes
/
HelpingFunc.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
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <iostream>
#include <iomanip>
using namespace std;
bool CharCheck(string mail, char check) {
for (int x=0;mail[x]!='\0';x++){
if (mail[x]==check)
return 1;
}
return 0;
}
int countDigit(char* Arr){
int count;
for (count=0;Arr[count]!='\0';count++);
return count;
}
bool RangeCheck(char* Array,char start,char finish){
for (int x=0;Array[x]!='\0';x++){
if (Array[x]>=start && Array[x]<=finish) return 1;
}
return 0;
}
bool OnlyNumCheck(char* Arr){
for (int count=0;Arr[count]!='\0';count++)
if (Arr[count]<='0' && Arr[count]>='9')
return 1;
return 0;
}
bool NumCheck(char* Arr){
for (int count=0;Arr[count]!='\0';count++)
if (Arr[count]>='0' && Arr[count]<='9')
return 1;
return 0;
}
bool stringCmp(string a, string b){
if (a==b) return 1;
return 0;
}