#include <string>#include "ut_types.h"Go to the source code of this file.
Functions | |
| ABI_EXPORT std::string | UT_escapeXML (const std::string &) |
| replacement for UT_UTF8String::escapeXML escapes '<', '>', '"' and '&' in the current string | |
| ABI_EXPORT std::string & | UT_std_string_vprintf (std::string &inStr, const char *format, va_list args1) ABI_PRINTF_FORMAT(2 |
| ABI_EXPORT std::string &ABI_EXPORT std::string | UT_std_string_sprintf (const char *inFormat,...) ABI_PRINTF_FORMAT(1 |
| ABI_EXPORT std::string &ABI_EXPORT std::string ABI_EXPORT bool | starts_with (const std::string &fullstring, const std::string &prefix) |
| true if fullstring starts with exactly prefix. | |
| ABI_EXPORT bool | ends_with (const std::string &fullstring, const std::string &ending) |
| ABI_EXPORT std::string | replace_all (const std::string &s, char oldc, char newc) |
| ABI_EXPORT std::string | replace_all (const std::string &s, const std::string &olds, const std::string &news) |
| ABI_EXPORT std::string | UT_XML_cloneNoAmpersands (const std::string &szSource) |
| ABI_EXPORT std::string | UT_std_string_getPropVal (const std::string &sPropertyString, const std::string &sProp) |
| ABI_EXPORT void | UT_std_string_removeProperty (std::string &sPropertyString, const std::string &sProp) |
| ABI_EXPORT void | UT_std_string_setProperty (std::string &sPropertyString, const std::string &sProp, const std::string &sVal) |
| ABI_EXPORT const std::string | StreamToString (std::istream &iss) |
| ABI_EXPORT std::string | toTimeString (time_t TT) |
| ABI_EXPORT time_t | toTime (struct tm *tm) |
| ABI_EXPORT time_t | parseTimeString (const std::string &stddatestr) |
| ABI_EXPORT bool ends_with | ( | const std::string & | fullstring, | |
| const std::string & | ending | |||
| ) |
| ABI_EXPORT time_t parseTimeString | ( | const std::string & | stddatestr | ) |
References toTime(), and UT_strptime().
Referenced by PD_RDFEvent::PD_RDFEvent(), and AP_RDFEventGTK::updateFromEditorData().
| ABI_EXPORT std::string replace_all | ( | const std::string & | s, | |
| const std::string & | olds, | |||
| const std::string & | news | |||
| ) |
| ABI_EXPORT std::string replace_all | ( | const std::string & | s, | |
| char | oldc, | |||
| char | newc | |||
| ) |
| ABI_EXPORT std::string& ABI_EXPORT std::string ABI_EXPORT bool starts_with | ( | const std::string & | fullstring, | |
| const std::string & | prefix | |||
| ) |
true if fullstring starts with exactly prefix.
Referenced by PD_XMLIDCreator::createUniqueXMLID(), AP_RDFSemanticItemGTKInjected< AP_RDFContact >::getExportToFileName(), AP_RDFSemanticItemGTKInjected< AP_RDFContact >::getImportFromFileName(), AbiCommand::parseTokens(), AbiCommand::tokenizeString(), and PD_RDFModel::uriToPrefixed().
| ABI_EXPORT const std::string StreamToString | ( | std::istream & | iss | ) |
Referenced by PD_RDFEvent::importFromData(), and PD_RDFContact::importFromData().
| ABI_EXPORT time_t toTime | ( | struct tm * | tm | ) |
Referenced by parseTimeString().
| ABI_EXPORT std::string toTimeString | ( | time_t | TT | ) |
References s.
Referenced by setEntry(), PD_RDFEvent::setupStylesheetReplacementMapping(), and PD_RDFSemanticItem::updateTriple().
| ABI_EXPORT std::string UT_escapeXML | ( | const std::string & | ) |
replacement for UT_UTF8String::escapeXML escapes '<', '>', '"' and '&' in the current string
Referenced by s_WML_Listener::_emitTOC(), s_DocBook_Listener::_handleMetaData(), s_DocBook_Listener::_handleTOC(), IE_Exp_S5::_writeHeader(), IE_Exp_EPUB::escapeForId(), OXML_Element_Image::serialize(), IE_Exp_OpenXML::startStyle(), TFTEST_MAIN(), and OO_MetaDataWriter::writeMetaData().
| ABI_EXPORT std::string UT_std_string_getPropVal | ( | const std::string & | sPropertyString, | |
| const std::string & | sProp | |||
| ) |
Some functions to add/subtract and extract std::string properties from a std::string of properties.
Assuming a string of standard abiword properties eg. "fred:nerk; table-width:1.0in; table-height:10.in" Return the value of the property sProp or NULL if it is not present.
References UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by ODi_TextContent_ListenerState::_openAbiSection(), IE_Imp_RTF::HandleAbiCell(), IE_Imp_RTF::HandleAbiMathml(), IE_Imp_RTF::HandleAbiTable(), and TFTEST_MAIN().
| ABI_EXPORT void UT_std_string_removeProperty | ( | std::string & | sPropertyString, | |
| const std::string & | sProp | |||
| ) |
Assuming a string of standard abiword properties eg. "fred:nerk; table-width:1.0in; table-height:10.in" Remove the property sProp and it's value from the string of properties.
Referenced by IE_Imp_RTF::HandleAbiMathml(), IE_Imp_RTF::HandleAbiTable(), TFTEST_MAIN(), and UT_std_string_setProperty().
| ABI_EXPORT void UT_std_string_setProperty | ( | std::string & | sPropertyString, | |
| const std::string & | sProp, | |||
| const std::string & | sVal | |||
| ) |
Assuming a string of standard abiword properties eg. "fred:nerk; table-width:1.0in; table-height:10.in" Add the property sProp with value sVal to the string of properties. If the property is already present, replace the old value with the new value.
References UT_std_string_removeProperty().
Referenced by IE_Imp_RTF::_setStringProperty(), IE_Imp_RTF::addFrame(), IE_Imp_RTF::closePastedTableIfNeeded(), IE_Imp_RTF::FlushCellProps(), IE_Imp_RTF::HandleAbiCell(), ODi_TextContent_ListenerState::startElement(), and TFTEST_MAIN().
| ABI_EXPORT std::string& ABI_EXPORT std::string UT_std_string_sprintf | ( | const char * | inFormat, | |
| ... | ||||
| ) |
| ABI_EXPORT std::string& UT_std_string_vprintf | ( | std::string & | inStr, | |
| const char * | format, | |||
| va_list | args1 | |||
| ) |
| ABI_EXPORT std::string UT_XML_cloneNoAmpersands | ( | const std::string & | szSource | ) |
References FREEP, gchar, and UT_XML_cloneNoAmpersands().
Referenced by AP_UnixDialog_Tab::_constructWindow(), AP_UnixDialog_Paragraph::_constructWindow(), AP_UnixDialog_Paragraph::_constructWindowContents(), XAP_Dialog_Insert_Symbol::ConstructWindowName(), AP_Dialog_WordCount::ConstructWindowName(), AP_Dialog_SplitCells::ConstructWindowName(), AP_Dialog_Replace::ConstructWindowName(), AP_Dialog_Modeless::ConstructWindowName(), AP_Dialog_MergeCells::ConstructWindowName(), AP_Dialog_Latex::ConstructWindowName(), AP_Dialog_Goto::ConstructWindowName(), AP_Dialog_FormatTable::ConstructWindowName(), AP_Dialog_FormatFrame::ConstructWindowName(), AP_Dialog_Border_Shading::ConstructWindowName(), localizeButton(), localizeLabel(), localizeLabelMarkup(), localizeMenu(), Markup(), and UT_XML_cloneNoAmpersands().
1.7.1