PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
PString.h File Reference
#include <string.h>
#include <string>
#include <iostream>
#include <vector>
#include "PString_impl.h"
+ Include dependency graph for PString.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PString
 Extends the std::string. More...
 

Typedefs

typedef std::vector< PStringPVecString
 

Functions

PVecString eraseFirstLastChar (const PVecString &vecStr, const PString &vecChar)
 Erase first and last characters of all PString in given vector. More...
 
void eraseFirstLastChar (PVecString &vecOut, const PVecString &vecStr, const PString &vecChar)
 Erase first and last characters of all PString in given vector. More...
 
PString phoenix_charToString (const char *ch)
 Convert a char pointer into a string (event if the char pointer is NULL) More...
 
bool phoenix_isCharLowerCase (char ch)
 Tels if the character is lower case letter. More...
 
bool phoenix_isCharNumber (char ch)
 Tels if the character is a number or not. More...
 
bool phoenix_isCharUpperCase (char ch)
 Tels if the character is upper case letter. More...
 

Typedef Documentation

◆ PVecString

typedef std::vector<PString> PVecString

Definition at line 96 of file PString.h.

Function Documentation

◆ eraseFirstLastChar() [1/2]

PVecString eraseFirstLastChar ( const PVecString vecStr,
const PString vecChar 
)

Erase first and last characters of all PString in given vector.

Parameters
vecStr: input PString
vecChar: set of characters to be removed
Returns
output vector of PString

Definition at line 63 of file PString.cpp.

63  {
64  PVecString vecOut;
65  eraseFirstLastChar(vecOut, vecStr, vecChar);
66  return vecOut;
67 }
void eraseFirstLastChar(PVecString &vecOut, const PVecString &vecStr, const PString &vecChar)
Erase first and last characters of all PString in given vector.
Definition: PString.cpp:52
std::vector< PString > PVecString
Definition: PString.h:96

References eraseFirstLastChar().

+ Here is the call graph for this function:

◆ eraseFirstLastChar() [2/2]

void eraseFirstLastChar ( PVecString vecOut,
const PVecString vecStr,
const PString vecChar 
)

Erase first and last characters of all PString in given vector.

Parameters
[out]vecOut: output vector of PString
vecStr: input PString
vecChar: set of characters to be removed

Definition at line 52 of file PString.cpp.

52  {
53  for(PVecString::const_iterator it(vecStr.begin()); it != vecStr.end(); ++it){
54  vecOut.push_back(it->eraseFirstLastChar(vecChar));
55  }
56 }

Referenced by checkEraseChar(), and eraseFirstLastChar().

+ Here is the caller graph for this function:

◆ phoenix_charToString()

PString phoenix_charToString ( const char *  ch)

Convert a char pointer into a string (event if the char pointer is NULL)

Parameters
ch: char pointer to be converted into a string
Returns
corresponding string, or empty string if the input char pointer is NULL

Definition at line 14 of file PString.cpp.

14  {
15  if(ch != NULL){
16  PString str(ch);
17  return str;
18  }else{
19  return "";
20  }
21 }
Extends the std::string.
Definition: PString.h:16

Referenced by PString::add(), checkCharToString(), PPath::getCurrentDirectory(), and phoenix_getenv().

+ Here is the caller graph for this function:

◆ phoenix_isCharLowerCase()

bool phoenix_isCharLowerCase ( char  ch)

Tels if the character is lower case letter.

Parameters
ch: caractère à tester
Returns
true if the character is lower case letter, false otherwise

Definition at line 35 of file PString.cpp.

35  {
36  return (ch >= 97 && ch <= 122);
37 }

Referenced by PString::firstToUpper(), PString::isLowerCase(), and PString::toUpper().

+ Here is the caller graph for this function:

◆ phoenix_isCharNumber()

bool phoenix_isCharNumber ( char  ch)

Tels if the character is a number or not.

Parameters
ch: character to be analysed
Returns
true if it is a number, false otherwise

Definition at line 43 of file PString.cpp.

43  {
44  return (ch >= 48 && ch <= 57);
45 }

Referenced by PString::isNumber().

+ Here is the caller graph for this function:

◆ phoenix_isCharUpperCase()

bool phoenix_isCharUpperCase ( char  ch)

Tels if the character is upper case letter.

Parameters
ch: caractère à tester
Returns
true if character is upper case letter, false otherwise

Definition at line 27 of file PString.cpp.

27  {
28  return (ch >= 65 && ch <= 90);
29 }

Referenced by PString::firstToLower(), PString::isUpperCase(), PString::toLower(), and PString::toLowerUnderscore().

+ Here is the caller graph for this function: