Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

utf8.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       utf8.h
00014 
00015   Author:     Mathias Kettner <kettner@suse.de>
00016   Maintainer: Stefan Hundhammer <sh@suse.de>
00017 
00018 /-*/
00019 
00020 // -*- c++ -*-
00021 
00022 #ifndef utf8_h
00023 #define utf8_h
00024 
00025 #include <qstring.h>
00026 #include <string>
00027 
00028 inline QString fromUTF8(const string &str)
00029 {
00030     return QString::fromUtf8(str.c_str() );
00031 }
00032 
00033 
00034 inline string toUTF8(const QString &str)
00035 {
00036     QCString result = str.isEmpty() ? QCString("") : str.utf8();
00037     return string(result.data() );
00038 }
00039 
00040 #endif // utf8_h

Generated on Fri Oct 14 19:03:46 2005 for yast2-qt by doxygen 1.3.6