UConversion.h
Go to the documentation of this file.
00001 /*
00002 *  utilite is a cross-platform library with
00003 *  useful utilities for fast and small developing.
00004 *  Copyright (C) 2010  Mathieu Labbe
00005 *
00006 *  utilite is free library: you can redistribute it and/or modify
00007 *  it under the terms of the GNU Lesser General Public License as published by
00008 *  the Free Software Foundation, either version 3 of the License, or
00009 *  (at your option) any later version.
00010 *
00011 *  utilite is distributed in the hope that it will be useful,
00012 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 *  GNU Lesser General Public License for more details.
00015 *
00016 *  You should have received a copy of the GNU Lesser General Public License
00017 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00020 #ifndef UCONVERSION_H
00021 #define UCONVERSION_H
00022 
00023 //#include "utilite/UtiLiteExp.h" // DLL export/import defines
00024 
00025 #include <string>
00026 #include <vector>
00027 #include <stdarg.h>
00028 
00051 std::string uReplaceChar(const std::string & str, char before, char after);
00052 
00067 std::string uReplaceChar(const std::string & str, char before, const std::string & after);
00068 
00080 std::string uToUpperCase(const std::string & str);
00081 
00093 std::string uToLowerCase(const std::string & str);
00094 
00100 std::string uNumber2Str(unsigned int number);
00106 std::string uNumber2Str(int number);
00112 std::string uNumber2Str(float number);
00118 std::string uNumber2Str(double number);
00119 
00126 std::string uBool2Str(bool boolean);
00134 bool uStr2Bool(const char * str);
00135 
00151 std::string uBytes2Hex(const char * bytes, unsigned int bytesLen);
00166 std::vector<char> uHex2Bytes(const std::string & hex);
00181 std::vector<char> uHex2Bytes(const char * hex, int hexLen);
00182 
00199 std::string uHex2Str(const std::string & hex);
00200 
00213 unsigned char uHex2Ascii(const unsigned char & c, bool rightPart);
00214 
00227 unsigned char uAscii2Hex(const unsigned char & c);
00228 
00232 std::string uFormatv (const char *fmt, va_list ap);
00233 
00237 std::string uFormat (const char *fmt, ...);
00238 
00239 #ifdef WIN32
00240 
00244 wchar_t * createWCharFromChar(const char * text);
00245 
00250 char * createCharFromWChar(const wchar_t * wText);
00251 #endif
00252 
00253 #endif /* UCONVERSION_H */


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Fri Feb 12 2016 01:18:17