psfunctions.h
Go to the documentation of this file.
#ifndef PSFUNCTIONS_H
#define PSFUNCTIONS_H
#include <iostream>
#include <string>
using namespace std;
string toUpperString(const string &st);
unsigned int countCharsOfType(const string &st,
int (* filterFunction)(int args) ,
unsigned int fromIdx, unsigned int toIdx);
unsigned int countUppercase(const string &st);
unsigned int countLowercase(const string &st);
unsigned int countDigits(const string &st);
unsigned int countSymbols(const string &st);
unsigned int middleDigitsOrSymbols(const string &st);
int isSymbol(int c);
int isDigitOrSymbol(int c);
unsigned int countConsecutive(const string &st, int (* filterFunction)(int args) );
unsigned int consecUppercase(const string &st);
unsigned int consecLowercase(const string &st);
unsigned int consecDigits(const string &st);
#endif // PSFUNCTIONS_H
isSymbol
int isSymbol(int c)
Returns 1 if the passed argument is a symbol.
Definition: psfunctions.cpp:83
countLowercase
unsigned int countLowercase(const string &st)
Given a string will return the number of lowercase characters.
Definition: psfunctions.cpp:72
countDigits
unsigned int countDigits(const string &st)
Given a string will return the number of digits.
Definition: psfunctions.cpp:107
std
middleDigitsOrSymbols
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
countCharsOfType
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
countSymbols
unsigned int countSymbols(const string &st)
Given a string will return the number of symbols.
Definition: psfunctions.cpp:119
consecDigits
unsigned int consecDigits(const string &st)
Given a string will return the number of digits that follow a digit.
Definition: psfunctions.cpp:223
isDigitOrSymbol
int isDigitOrSymbol(int c)
Returns 1 if the passed argument is a digit or symbol.
Definition: psfunctions.cpp:95
toUpperString
string toUpperString(const string &st)
Returns an uppercase version of the received string.
Definition: psfunctions.cpp:130
consecUppercase
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
consecLowercase
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
countUppercase
unsigned int countUppercase(const string &st)
Given a string will return the number of uppercase characters.
Definition: psfunctions.cpp:59