#include <string.h>#include "ut_assert.h"#include "ut_std_string.h"#include "ut_string.h"#include <iostream>#include <sstream>#include <list>Functions | |
| std::string | UT_escapeXML (const std::string &s) |
| replacement for UT_UTF8String::escapeXML escapes '<', '>', '"' and '&' in the current string | |
| std::string & | UT_std_string_vprintf (std::string &inStr, const char *format, va_list args1) |
| std::string | UT_std_string_sprintf (const char *inFormat,...) |
| bool | ends_with (const std::string &s, const std::string &ending) |
| bool | starts_with (const std::string &s, const std::string &starting) |
| true if fullstring starts with exactly prefix. | |
| std::string | replace_all (const std::string &s, char oldc, char newc) |
| std::string | replace_all (const std::string &s, const std::string &olds, const std::string &news) |
| std::string | UT_XML_cloneNoAmpersands (const std::string &src) |
| std::string | UT_std_string_getPropVal (const std::string &sPropertyString, const std::string &sProp) |
| void | UT_std_string_setProperty (std::string &sPropertyString, const std::string &sProp, const std::string &sVal) |
| void | UT_std_string_removeProperty (std::string &sPropertyString, const std::string &sProp) |
| const std::string | StreamToString (std::istream &iss) |
| std::string | toTimeString (time_t TT) |
| time_t | toTime (struct tm *tm) |
| time_t | parseTimeString (const std::string &stddatestr) |
| bool ends_with | ( | const std::string & | s, | |
| const std::string & | ending | |||
| ) |
| time_t parseTimeString | ( | const std::string & | stddatestr | ) |
References toTime(), and UT_strptime().
Referenced by PD_RDFEvent::PD_RDFEvent(), and AP_RDFEventGTK::updateFromEditorData().
| std::string replace_all | ( | const std::string & | s, | |
| const std::string & | olds, | |||
| const std::string & | news | |||
| ) |
| std::string replace_all | ( | const std::string & | s, | |
| char | oldc, | |||
| char | newc | |||
| ) |
| bool starts_with | ( | const std::string & | s, | |
| const std::string & | starting | |||
| ) |
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().
| const std::string StreamToString | ( | std::istream & | iss | ) |
Referenced by PD_RDFEvent::importFromData(), and PD_RDFContact::importFromData().
| time_t toTime | ( | struct tm * | tm | ) |
Referenced by parseTimeString().
| std::string toTimeString | ( | time_t | TT | ) |
References s.
Referenced by setEntry(), PD_RDFEvent::setupStylesheetReplacementMapping(), and PD_RDFSemanticItem::updateTriple().
| std::string UT_escapeXML | ( | const std::string & | s | ) |
replacement for UT_UTF8String::escapeXML escapes '<', '>', '"' and '&' in the current string
Referenced by s_DocBook_Listener::_handleMetaData(), IE_Exp_S5::_writeHeader(), TFTEST_MAIN(), and OO_MetaDataWriter::writeMetaData().
| std::string UT_std_string_getPropVal | ( | const 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" Return the value of the property sProp or NULL if it is not present.
References UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by IE_Imp_RTF::HandleAbiCell(), IE_Imp_RTF::HandleAbiMathml(), IE_Imp_RTF::HandleAbiTable(), and TFTEST_MAIN().
| 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().
| 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(), and TFTEST_MAIN().
| std::string UT_std_string_sprintf | ( | const char * | inFormat, | |
| ... | ||||
| ) |
References UT_std_string_vprintf().
Referenced by IE_Imp_RTF::_appendHdrFtr(), GR_CairoGraphics::_findFont(), IE_Imp_RTF::_formRevisionAttr(), AP_Dialog_Border_Shading::_getToggleButtonStatus(), s_KWord_1_Listener::_handleDataItems(), s_AbiWord_1_Listener::_handleRevisions(), IE_Imp_RTF::addFrame(), IE_Imp_RTF::ApplyParagraphAttributes(), IE_Imp_RTF::ApplySectionAttributes(), AP_Dialog_FormatFrame::askForGraphicPathName(), RTF_msword97_level::buildAbiListProperties(), IE_Imp_RTF::buildAllProps(), IE_Imp_RTF::buildCharacterProps(), IE_Imp_RTF::closePastedTableIfNeeded(), IE_Imp_DocBook::createImage(), GR_CairoRasterImage::createImageSegment(), IE_Imp_RTF::EndAnnotation(), ODi_TextContent_ListenerState::endElement(), ODe_ManifestWriter::ensureDirectoryManifest(), IE_Exp_EPUB::EPUB2_writeNavigation(), IE_Exp_EPUB::EPUB3_writeNavigation(), AP_Dialog_RDFQuery::executeQuery(), IE_Imp_RTF::HandleAbiCell(), IE_Imp_RTF::HandleAbiEndTable(), IE_Imp_RTF::HandleAbiTable(), IE_Imp_RTF::HandleAnnotation(), IE_Imp_RTF::HandleNote(), IE_Imp_RTF::HandleNoteReference(), FV_View::insertAnnotation(), IE_Imp_RTF::InsertImage(), ODc_reorderDate(), OO_PageStyle::parse(), GR_PangoFont::reloadFont(), FV_View::setAnnotationText(), XAP_UnixWidget::setLabel(), XAP_UnixWidget::setValueFloat(), XAP_UnixWidget::setValueInt(), IE_Imp_RTF::StartAnnotation(), AP_Dialog_RDFEditor::statusIsTripleCount(), IE_Imp_RTF::TranslateKeywordID(), ODe_ManifestWriter::writeManifest(), OO_ManifestWriter::writeManifest(), ODe_MetaDataWriter::writeMetaData(), OO_MetaDataWriter::writeMetaData(), and OO_PicturesWriter::writePictures().
| std::string& UT_std_string_vprintf | ( | std::string & | inStr, | |
| const char * | format, | |||
| va_list | args1 | |||
| ) |
Referenced by UT_std_string_sprintf().
| std::string UT_XML_cloneNoAmpersands | ( | const std::string & | src | ) |
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