My Project
psfunctions.h
Go to the documentation of this file.
1 #ifndef PSFUNCTIONS_H
2 #define PSFUNCTIONS_H
3 
5 
6 #include <iostream>
7 #include <string>
8 
9 using namespace std;
10 
18 string toUpperString(const string &st);
19 
39 unsigned int countCharsOfType(const string &st,
40  int (* filterFunction)(int args) ,
41  unsigned int fromIdx, unsigned int toIdx);
42 
52 unsigned int countUppercase(const string &st);
53 
63 unsigned int countLowercase(const string &st);
64 
72 unsigned int countDigits(const string &st);
73 
81 unsigned int countSymbols(const string &st);
82 
92 unsigned int middleDigitsOrSymbols(const string &st);
93 
101 int isSymbol(int c);
102 
110 int isDigitOrSymbol(int c);
111 
128 unsigned int countConsecutive(const string &st, int (* filterFunction)(int args) );
129 
139 unsigned int consecUppercase(const string &st);
140 
150 unsigned int consecLowercase(const string &st);
151 
161 unsigned int consecDigits(const string &st);
162 
163 
164 #endif // PSFUNCTIONS_H
int isSymbol(int c)
Returns 1 if the passed argument is a symbol.
Definition: psfunctions.cpp:83
unsigned int countLowercase(const string &st)
Given a string will return the number of lowercase characters.
Definition: psfunctions.cpp:72
unsigned int countDigits(const string &st)
Given a string will return the number of digits.
Definition: psfunctions.cpp:107
unsigned int middleDigitsOrSymbols(const string &st)
Returns the number of digits and symbols that are not the first or last characters of the received st...
Definition: psfunctions.cpp:147
unsigned int countCharsOfType(const string &st, int(*filterFunction)(int args), int fromIdx=0, int toIdx=-1)
Given a string will return the number of characters of a certain type.
Definition: psfunctions.cpp:25
unsigned int countSymbols(const string &st)
Given a string will return the number of symbols.
Definition: psfunctions.cpp:119
unsigned int consecDigits(const string &st)
Given a string will return the number of digits that follow a digit.
Definition: psfunctions.cpp:223
int isDigitOrSymbol(int c)
Returns 1 if the passed argument is a digit or symbol.
Definition: psfunctions.cpp:95
string toUpperString(const string &st)
Returns an uppercase version of the received string.
Definition: psfunctions.cpp:130
unsigned int consecUppercase(const string &st)
Given a string will return the number of uppercase characters that follow a character of that same ty...
Definition: psfunctions.cpp:195
unsigned int consecLowercase(const string &st)
Given a string will return the number of lowercase characters that follow a character of that same ty...
Definition: psfunctions.cpp:209
unsigned int countUppercase(const string &st)
Given a string will return the number of uppercase characters.
Definition: psfunctions.cpp:59