Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __UT_STD_STRING_H__
00024 #define __UT_STD_STRING_H__
00025
00026 #include <string>
00027 #include <vector>
00028 #include <algorithm>
00029 #include <functional>
00030 #include <locale>
00031
00032 #include "ut_types.h"
00033
00034
00038 ABI_EXPORT std::string UT_escapeXML(const std::string &);
00039
00042 ABI_EXPORT std::string UT_decodeXML(const std::string &);
00043
00044 ABI_EXPORT std::string& UT_std_string_vprintf (std::string & inStr,
00045 const char *format,
00046 va_list args1)
00047 ABI_PRINTF_FORMAT(2,0);
00048
00049 ABI_EXPORT std::string UT_std_string_sprintf(const char * inFormat, ...)
00050 ABI_PRINTF_FORMAT(1,2);
00051
00052
00059 ABI_EXPORT std::string UT_std_string_unicode(const UT_UCS4Char * unicode,
00060 UT_uint32 len);
00067 ABI_EXPORT std::string UT_std_stringFromEncoding(const char* bytes,
00068 const char* encoding);
00069
00073 ABI_EXPORT bool starts_with( const std::string& fullstring, const std::string& prefix );
00074 ABI_EXPORT bool ends_with( const std::string& fullstring, const std::string& ending );
00075 ABI_EXPORT std::string replace_all( const std::string& s, char oldc, char newc );
00076 ABI_EXPORT std::string replace_all( const std::string& s,
00077 const std::string& olds,
00078 const std::string& news );
00079
00084 ABI_EXPORT std::string & UT_tolower(std::string& s);
00085
00086 ABI_EXPORT std::string UT_XML_cloneNoAmpersands( const std::string& szSource );
00087
00088 ABI_EXPORT std::vector<std::string> UT_simpleSplit(const std::string & str,
00089 char separator = ' ');
00090
00091
00095 ABI_EXPORT std::string UT_ellipsisPath(const std::string & path, size_t maxlen, size_t cut);
00096
00100 ABI_EXPORT std::string UT_std_string_getPropVal(const std::string & sPropertyString, const std::string & sProp);
00101 ABI_EXPORT void UT_std_string_removeProperty(std::string & sPropertyString, const std::string & sProp);
00102 ABI_EXPORT void UT_std_string_setProperty(std::string & sPropertyString, const std::string &sProp, const std::string & sVal);
00103
00104 ABI_EXPORT void UT_std_string_addPropertyString(std::string & sPropertyString, const std::string &sNewProp);
00105
00106
00107 ABI_EXPORT const std::string StreamToString( std::istream& iss );
00108 ABI_EXPORT std::string toTimeString( time_t TT );
00109 ABI_EXPORT time_t toTime( struct tm *tm );
00110 ABI_EXPORT time_t parseTimeString( const std::string& stddatestr );
00111
00112
00113
00114
00115 #endif
00116