My Project
Functions
psfunctions.h File Reference
#include <iostream>
#include <string>

Go to the source code of this file.

Functions

string toUpperString (const string &st)
 Returns an uppercase version of the received string. More...
 
unsigned int countCharsOfType (const string &st, int(*filterFunction)(int args), unsigned int fromIdx, unsigned int toIdx)
 
unsigned int countUppercase (const string &st)
 Given a string will return the number of uppercase characters. More...
 
unsigned int countLowercase (const string &st)
 Given a string will return the number of lowercase characters. More...
 
unsigned int countDigits (const string &st)
 Given a string will return the number of digits. More...
 
unsigned int countSymbols (const string &st)
 Given a string will return the number of symbols. More...
 
unsigned int middleDigitsOrSymbols (const string &st)
 Returns the number of digits and symbols that are not the first or last characters of the received string. More...
 
int isSymbol (int c)
 Returns 1 if the passed argument is a symbol. More...
 
int isDigitOrSymbol (int c)
 Returns 1 if the passed argument is a digit or symbol. More...
 
unsigned int countConsecutive (const string &st, int(*filterFunction)(int args))
 
unsigned int consecUppercase (const string &st)
 Given a string will return the number of uppercase characters that follow a character of that same type. More...
 
unsigned int consecLowercase (const string &st)
 Given a string will return the number of lowercase characters that follow a character of that same type. More...
 
unsigned int consecDigits (const string &st)
 Given a string will return the number of digits that follow a digit. More...
 

Function Documentation

unsigned int consecDigits ( const string &  st)

Given a string will return the number of digits that follow a digit.

Parameters
ststring by reference to analyze
unsigned int consecLowercase ( const string &  st)

Given a string will return the number of lowercase characters that follow a character of that same type.

Parameters
ststring by reference to analyze
unsigned int consecUppercase ( const string &  st)

Given a string will return the number of uppercase characters that follow a character of that same type.

Parameters
ststring by reference to analyze
unsigned int countDigits ( const string &  st)

Given a string will return the number of digits.

Parameters
ststring by reference to analyze
unsigned int countLowercase ( const string &  st)

Given a string will return the number of lowercase characters.

Parameters
ststring by reference to analyze
unsigned int countSymbols ( const string &  st)

Given a string will return the number of symbols.

Parameters
ststring by reference to analyze
unsigned int countUppercase ( const string &  st)

Given a string will return the number of uppercase characters.

Parameters
ststring by reference to analyze
int isDigitOrSymbol ( int  c)

Returns 1 if the passed argument is a digit or symbol.

Parameters
cthe character to be analyzed.
int isSymbol ( int  c)

Returns 1 if the passed argument is a symbol.

Parameters
cthe character to be analyzed.
unsigned int middleDigitsOrSymbols ( const string &  st)

Returns the number of digits and symbols that are not the first or last characters of the received string.

Parameters
ststring by reference to analyze
string toUpperString ( const string &  st)

Returns an uppercase version of the received string.

Parameters
ststring by reference to analyze