misc.cc File Reference

module with miscelaneous functions More...

#include <iostream>
#include <sstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>

Include dependency graph for misc.cc:


Functions

bool isInt (string s)
 test whether string contains an integer or not
int str2int (string s)
 converts string to '0+' integer
string int2str (int i)
 converts integer to string
string str_before (string str, string substr)
 returns sub-string apearing before substr in str
string str_between (string str, string sub_l, string sub_r)
 returns sub-string apearing between sub_l (left) and sub_r (right) in str
string str_after (string str, string substr)
 returns sub-string apearing after substr in str
string replaceSubstrWithVal (string str, string sub, string val)
 replaces sub placed in str by val

Variables

bool debug_mode
 debug/normal mode switch. In debug mode, implementation and low-level model related data are sent to std. Undocumented at present.
unsigned long nerrors
 number of errors counter

Detailed Description

module with miscelaneous functions


Function Documentation

string int2str ( int  i  ) 

converts integer to string

bool isInt ( string  s  ) 

test whether string contains an integer or not

string replaceSubstrWithVal ( string  str,
string  sub,
string  val 
)

replaces sub placed in str by val

Parameters:
[in] str string a substring is searched in
[in] sub searched substring
[in] val string-value to replace sub in str

int str2int ( string  s  ) 

converts string to '0+' integer

string str_after ( string  str,
string  substr 
)

returns sub-string apearing after substr in str

Parameters:
[in] str string a substring is searched in
[in] substr searched substring

string str_before ( string  str,
string  substr 
)

returns sub-string apearing before substr in str

Parameters:
[in] str string a substring is searched in
[in] substr searched substring

string str_between ( string  str,
string  sub_l,
string  sub_r 
)

returns sub-string apearing between sub_l (left) and sub_r (right) in str

Parameters:
[in] str string a substring is searched in
[in] sub_l substring placed on the left of searched substring
[in] sub_r substring placed on the right of searched substring


Variable Documentation

bool debug_mode

debug/normal mode switch. In debug mode, implementation and low-level model related data are sent to std. Undocumented at present.

unsigned long nerrors

number of errors counter


Generated on Mon Aug 25 08:39:24 2008 for TASTE by  doxygen 1.5.6