• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ut_std_string.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 1998,1999 AbiSource, Inc.
00003  * Copyright (C) 2009 Hubert Figuiere
00004  * Copyright (C) 2011 Ben Martin
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program 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 General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 
00023 #ifndef __UT_STD_STRING_H__
00024 #define __UT_STD_STRING_H__
00025 
00026 #include <string>
00027 
00028 #include "ut_types.h"
00029 
00030 
00034 ABI_EXPORT std::string UT_escapeXML(const std::string &);
00035 
00036 ABI_EXPORT std::string& UT_std_string_vprintf (std::string & inStr,
00037                                                const char *format,
00038                                                va_list      args1)
00039     ABI_PRINTF_FORMAT(2,0);
00040 
00041 ABI_EXPORT std::string UT_std_string_sprintf(const char * inFormat, ...)
00042     ABI_PRINTF_FORMAT(1,2);
00043 
00047 ABI_EXPORT bool starts_with( const std::string& fullstring, const std::string& prefix );
00048 ABI_EXPORT bool ends_with(   const std::string& fullstring, const std::string& ending );
00049 ABI_EXPORT std::string replace_all( const std::string& s, char oldc, char newc );
00050 ABI_EXPORT std::string replace_all( const std::string& s,
00051                                     const std::string& olds,
00052                                     const std::string& news );
00053 
00054 ABI_EXPORT std::string UT_XML_cloneNoAmpersands( const std::string& szSource );
00055 
00056 
00057 
00061 ABI_EXPORT std::string UT_std_string_getPropVal(const std::string & sPropertyString, const std::string & sProp);
00062 ABI_EXPORT void UT_std_string_removeProperty(std::string & sPropertyString, const std::string & sProp);
00063 ABI_EXPORT void UT_std_string_setProperty(std::string & sPropertyString, const std::string &sProp, const std::string & sVal);
00064 
00065 
00066 ABI_EXPORT const std::string StreamToString( std::istream& iss );
00067 ABI_EXPORT std::string toTimeString( time_t TT );
00068 ABI_EXPORT time_t toTime( struct tm *tm );
00069 ABI_EXPORT time_t parseTimeString( const std::string& stddatestr );
00070 
00071 
00072 
00073 
00074 #endif
00075 

Generated on Thu May 23 2013 for AbiWord by  doxygen 1.7.1