00001 /****************************************************************************** 00002 * TASTE (Testability Analysis SuiTE) version 1.00 00003 * Copyright (c) 2008 Josef Strnadel, all rights reserved 00004 * Brno University of Technology, Faculty of Information Technology 00005 * ----------------------------------------------------------------------------- 00006 * This is a free software: you can redistribute it and/or modify it 00007 * under the terms of the latest version of the GNU Lesser General Public License 00008 * as published by the Free Software Foundation. 00009 * 00010 * This software is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 * See the GNU General Public License and the GNU Lesser General Public License 00014 * for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * and GNU Lesser General Public License along with this software. 00018 * If not, see <http://www.gnu.org/licenses/>. 00019 * ----------------------------------------------------------------------------- 00020 * filename: misc.h 00021 * version: 1.00 00022 * started: 25. 4. 2007 00023 * last revised: 21. 7. 2008 00024 * language: ANSI C++ 00025 * author: Josef Strnadel 00026 * web: http://www.fit.vutbr.cz/~strnadel/index.php.en 00027 * e-mail: strnadel@fit.vutbr.cz 00028 * address: Bozetechova 2, 61266 Brno, Czech Republic 00029 * phone: +420 54114-1211 00030 * fax: +420 54114-1270 00031 * ----------------------------------------------------------------------------- 00032 * description: miscelaneous functions 00033 * ----------------------------------------------------------------------------- 00034 * notes: - 00035 * ----------------------------------------------------------------------------- 00036 * history of modifications: 00037 * - 00038 * ----------------------------------------------------------------------------- 00039 * known bugs: - 00040 ******************************************************************************/ 00042 00043 #include <string> 00044 00045 using namespace std; 00046 00047 #ifndef _MISC_H_ 00048 #define _MISC_H_ 00049 00050 bool isInt(string s); 00051 int str2int(string s); 00052 string int2str(int i); 00053 string str_before(string str, string substr); 00054 string str_between(string str, string substr1, string substr2); 00055 string str_after(string str, string substr); 00056 string replaceSubstrWithVal(string str, string sub, string val); 00057 00058 #endif