My Project
|
#include "psfunctions.h"
Functions | |
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. More... | |
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... | |
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 | 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... | |
string | toUpperString (const string &st) |
Returns an uppercase version of the received string. 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... | |
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... | |
unsigned int consecDigits | ( | const string & | st | ) |
Given a string will return the number of digits that follow a digit.
st | string 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.
st | string 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.
st | string by reference to analyze |
unsigned int countCharsOfType | ( | const string & | st, |
int(*)(int args) | filterFunction, | ||
int | fromIdx = 0 , |
||
int | toIdx = -1 |
||
) |
Given a string will return the number of characters of a certain type.
Given a string will return the number of characters of a certain type that follow a character of that same type.
st | string to analyze |
filterFunction | a function pointer to a function that returns 1 when a character of the type is given. For example, if function is islower, then countCharsOfType will count lowercase characters. |
fromIdx | index from where to start count |
toIdx | last index for count |
st | string to analyze |
filterFunction | a function pointer to a function that returns 1 when a character of the type is given. For example, if function is islower, then countConsecutive will count consecutive lowercase characters. |
unsigned int countDigits | ( | const string & | st | ) |
Given a string will return the number of digits.
st | string by reference to analyze |
unsigned int countLowercase | ( | const string & | st | ) |
Given a string will return the number of lowercase characters.
st | string by reference to analyze |
unsigned int countSymbols | ( | const string & | st | ) |
Given a string will return the number of symbols.
st | string by reference to analyze |
unsigned int countUppercase | ( | const string & | st | ) |
Given a string will return the number of uppercase characters.
st | string by reference to analyze |
int isDigitOrSymbol | ( | int | c | ) |
Returns 1 if the passed argument is a digit or symbol.
c | the character to be analyzed. |
int isSymbol | ( | int | c | ) |
Returns 1 if the passed argument is a symbol.
c | the 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.
st | string by reference to analyze |
string toUpperString | ( | const string & | st | ) |
Returns an uppercase version of the received string.
st | string by reference to analyze |