#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <ctype.h>
#include <stdarg.h>
#include <algorithm>
#include <glib.h>
#include "ut_string.h"
#include "ut_string_class.h"
#include "ut_stringbuf.h"
#include "ut_debugmsg.h"
#include "ut_iconv.h"
#include "ut_assert.h"
#include "ut_mbtowc.h"
#include "ut_bytebuf.h"
#include "ut_unicode.h"
Functions | |
size_t | UT_String_findCh (const UT_String &st, char ch) |
size_t | UT_String_findRCh (const UT_String &st, char ch) |
UT_String & | UT_String_vprintf (UT_String &inStr, const char *format, va_list args1) |
UT_String & | UT_String_vprintf (UT_String &inStr, const UT_String &format, va_list args1) |
UT_String & | UT_String_sprintf (UT_String &inStr, const char *inFormat,...) |
UT_String | UT_String_sprintf (const char *inFormat,...) |
UT_String | UT_String_vprintf (const char *inFormat, va_list args1) |
UT_String | UT_String_vprintf (const UT_String &inFormat, va_list args1) |
UT_String | UT_String_getPropVal (const UT_String &sPropertyString, const UT_String &sProp) |
void | UT_String_addPropertyString (UT_String &sPropertyString, const UT_String &sNewProp) |
void | UT_String_setProperty (UT_String &sPropertyString, const UT_String &sProp, const UT_String &sVal) |
void | UT_String_removeProperty (UT_String &sPropertyString, const UT_String &sProp) |
bool | operator== (const UT_String &s1, const UT_String &s2) |
bool | operator== (const UT_String &s1, const char *s2) |
bool | operator== (const char *s1, const UT_String &s2) |
bool | operator!= (const UT_String &s1, const UT_String &s2) |
bool | operator!= (const UT_String &s1, const char *s2) |
bool | operator!= (const char *s1, const UT_String &s2) |
bool | operator< (const UT_String &s1, const UT_String &s2) |
UT_String | operator+ (const UT_String &s1, const UT_String &s2) |
UT_uint32 | hashcode (const UT_String &string) |
UT_uint32 | hashcode (const char *p) |
UT_UTF8String | UT_UTF8String_getPropVal (const UT_UTF8String &sPropertyString, const UT_UTF8String &sProp) |
void | UT_UTF8String_addPropertyString (UT_UTF8String &sPropertyString, const UT_UTF8String &sNewProp) |
void | UT_UTF8String_setProperty (UT_UTF8String &sPropertyString, const UT_UTF8String &sProp, const UT_UTF8String &sVal) |
void | UT_UTF8String_removeProperty (UT_UTF8String &sPropertyString, const UT_UTF8String &sProp) |
bool | operator< (const UT_UTF8String &s1, const UT_UTF8String &s2) |
bool | operator== (const UT_UTF8String &s1, const UT_UTF8String &s2) |
bool | operator!= (const UT_UTF8String &s1, const UT_UTF8String &s2) |
bool | operator== (const UT_UTF8String &s1, const char *s2) |
bool | operator!= (const UT_UTF8String &s1, const char *s2) |
bool | operator== (const UT_UTF8String &s1, const std::string &s2) |
bool | operator!= (const UT_UTF8String &s1, const std::string &s2) |
bool | operator== (const std::string &s2, const UT_UTF8String &s1) |
bool | operator!= (const std::string &s2, const UT_UTF8String &s1) |
UT_UTF8String | operator+ (const UT_UTF8String &s1, const UT_UTF8String &s2) |
UT_UTF8String | UT_UTF8String_sprintf (const char *inFormat,...) |
UT_UTF8String & | UT_UTF8String_sprintf (UT_UTF8String &inStr, const char *inFormat,...) |
bool | operator== (const UT_UCS4String &s1, const UT_UCS4String &s2) |
bool | operator== (const UT_UCS4String &s1, const UT_UCS4Char *s2) |
bool | operator== (const UT_UCS4Char *s1, const UT_UCS4String &s2) |
bool | operator!= (const UT_UCS4String &s1, const UT_UCS4String &s2) |
bool | operator!= (const UT_UCS4String &s1, const UT_UCS4Char *s2) |
bool | operator!= (const UT_UCS4Char *s1, const UT_UCS4String &s2) |
bool | operator< (const UT_UCS4String &s1, const UT_UCS4String &s2) |
UT_UCS4String | operator+ (const UT_UCS4String &s1, const UT_UCS4String &s2) |
Variables | |
static const char | pszEmpty [] = { 0 } |
static const UT_UCS4Char | ucs4Empty [] = { 0 } |
References hashcode().
Referenced by key_wrapper::compute_hash(), and hashcode().
UT_uint32 hashcode | ( | const char * | p | ) |
References UT_return_val_if_fail.
bool operator!= | ( | const char * | s1, | |
const UT_String & | s2 | |||
) |
bool operator!= | ( | const UT_UTF8String & | s1, | |
const std::string & | s2 | |||
) |
References UT_UTF8String::size(), and UT_UTF8String::utf8_str().
bool operator!= | ( | const std::string & | s2, | |
const UT_UTF8String & | s1 | |||
) |
References UT_UTF8String::utf8_str().
bool operator!= | ( | const UT_UCS4String & | s1, | |
const UT_UCS4String & | s2 | |||
) |
bool operator!= | ( | const UT_UCS4String & | s1, | |
const UT_UCS4Char * | s2 | |||
) |
bool operator!= | ( | const UT_String & | s1, | |
const char * | s2 | |||
) |
bool operator!= | ( | const UT_UCS4Char * | s1, | |
const UT_UCS4String & | s2 | |||
) |
bool operator!= | ( | const UT_UTF8String & | s1, | |
const UT_UTF8String & | s2 | |||
) |
bool operator!= | ( | const UT_UTF8String & | s1, | |
const char * | s2 | |||
) |
References UT_UTF8String::utf8_str().
UT_UTF8String operator+ | ( | const UT_UTF8String & | s1, | |
const UT_UTF8String & | s2 | |||
) |
References s.
UT_UCS4String operator+ | ( | const UT_UCS4String & | s1, | |
const UT_UCS4String & | s2 | |||
) |
References s.
bool operator< | ( | const UT_UCS4String & | s1, | |
const UT_UCS4String & | s2 | |||
) |
References UT_UCS4String::ucs4_str(), and UT_UCS4_strcmp().
References UT_String::c_str().
bool operator< | ( | const UT_UTF8String & | s1, | |
const UT_UTF8String & | s2 | |||
) |
References UT_UTF8String::utf8_str().
bool operator== | ( | const UT_UTF8String & | s1, | |
const std::string & | s2 | |||
) |
References UT_UTF8String::size(), and UT_UTF8String::utf8_str().
bool operator== | ( | const std::string & | s2, | |
const UT_UTF8String & | s1 | |||
) |
References UT_UTF8String::utf8_str().
References UT_String::c_str(), and UT_String::size().
bool operator== | ( | const UT_UCS4String & | s1, | |
const UT_UCS4String & | s2 | |||
) |
References UT_UCS4String::size(), UT_UCS4String::ucs4_str(), and UT_UCS4_strcmp().
bool operator== | ( | const UT_UCS4String & | s1, | |
const UT_UCS4Char * | s2 | |||
) |
References UT_UCS4String::ucs4_str(), and UT_UCS4_strcmp().
bool operator== | ( | const UT_UCS4Char * | s1, | |
const UT_UCS4String & | s2 | |||
) |
bool operator== | ( | const UT_String & | s1, | |
const char * | s2 | |||
) |
References UT_String::c_str().
bool operator== | ( | const char * | s1, | |
const UT_String & | s2 | |||
) |
bool operator== | ( | const UT_UTF8String & | s1, | |
const UT_UTF8String & | s2 | |||
) |
References UT_UTF8String::size(), and UT_UTF8String::utf8_str().
bool operator== | ( | const UT_UTF8String & | s1, | |
const char * | s2 | |||
) |
References UT_UTF8String::utf8_str().
Assuming a string of standard abiword properties eg. "fred:nerk; table-width:1.0in; table-height:10.in" Add aother propety string, updating previously defined properties with values in the new string.
References UT_String::c_str(), UT_String::size(), UT_String::substr(), and UT_String_setProperty().
Referenced by TFTEST_MAIN().
size_t UT_String_findCh | ( | const UT_String & | st, | |
char | ch | |||
) |
References UT_String::size().
Referenced by IE_ExpSniffer::getPreferredSuffix(), UT_LocaleInfo::init(), and XAP_Win32AppImpl::openURL().
size_t UT_String_findRCh | ( | const UT_String & | st, | |
char | ch | |||
) |
References UT_String::size().
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. This UT_String * should be deleted by the calling programming after it is finished with it.
References UT_String::c_str(), UT_String::substr(), UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
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.
References UT_String::c_str(), UT_String::clear(), UT_String::size(), and UT_String::substr().
Referenced by TFTEST_MAIN(), and UT_String_setProperty().
void UT_String_setProperty | ( | UT_String & | sPropertyString, | |
const UT_String & | sProp, | |||
const UT_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_String::size(), and UT_String_removeProperty().
Referenced by TFTEST_MAIN(), and UT_String_addPropertyString().
References UT_String_vprintf().
Referenced by IE_Imp_WordPerfect::_appendSection(), IE_Imp_MsWord_97::_beginSect(), IE_Imp_MsWord_97::_cell_open(), GR_Win32USPGraphics::_constructorCommonCode(), s_LaTeX_Listener::_convertColor(), AP_TopRuler::_displayStatusMessage(), ODi_Frame_ListenerState::_drawInlineImage(), IE_Imp_MsWord_97::_generateCharProps(), IE_Imp_MsWord_97::_generateParaProps(), AP_UnixDialog_PageSetup::_getWidget(), AP_UnixDialog_FormatTOC::_getWidget(), s_KWord_1_Listener::_handlePageSize(), IE_Imp_MsWord_97::_handlePositionedImage(), OpenWriter_ContentStream_Listener::_insertImage(), pt_PieceTable::_loadBuiltinStyles(), AP_Win32Dialog_FormatTOC_General::_onCommand(), s_LaTeX_Listener::_openCell(), s_RTF_ListenerWriteDoc::_openFrame(), s_KWord_1_Listener::_openSpan(), s_RTF_ListenerWriteDoc::_openTag(), s_HRText_Listener::_openTag(), IE_Exp_RTF::_output_ListRTF(), s_Applix_Listener::_outputData(), s_RTF_ListenerWriteDoc::_rtf_docfmt(), IE_Exp_RTF::_rtf_keyword(), IE_Exp_RTF::_rtf_keyword_hex2(), IE_Exp_RTF::_rtf_keyword_ifnotdefault(), IE_Exp_RTF::_rtf_keyword_ifnotdefault_twips(), IE_Exp_RTF::_rtf_keyword_space(), IE_Exp_RTF::_rtf_nonascii_hex2(), s_RTF_ListenerWriteDoc::_rtf_open_section(), fp_AnnotationRun::_setValue(), IE_Imp_MsWord_97::_table_close(), IE_Exp_RTF::_write_parafmt(), s_RTF_ListenerWriteDoc::_writeEmbedData(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), s_KWord_1_Listener::_writeMarginSize(), IE_Imp_T602::_writeTP(), IE_Imp_GDA::addCell(), ODi_Abi_Data::addImageDataItem(), ODi_Abi_Data::addObjectDataItem(), PD_Document::areDocumentFormatsEqual(), AP_Dialog_FormatTable::askForGraphicPathName(), AP_Dialog_Tab::buildTab(), changed_cb(), SpellChecker::couldNotLoadDictionary(), GR_Win32Image::createImageSegment(), Defun1(), AP_UnixDialog_FormatTOC::event_Apply(), AP_UnixDialog_FormatTOC::event_HasHeadingChanged(), AP_UnixDialog_FormatTOC::event_HasLabelChanged(), GR_Win32Graphics::fixDevMode(), FV_FrameEdit::getFrameStrings(), XAP_Dialog_History::getHeaderValue(), XAP_Dialog_History::getListValue(), XAP_Dialog_DocComparison::getResultValue(), FL_DocLayout::getStringFromFootnoteVal(), FV_View::getTopRulerInfo(), XAP_Frame::makeBackupName(), Markup(), AP_TopRuler::mouseRelease(), OO_WriterImpl::OO_WriterImpl(), IE_Imp_WordPerfect::openListElement(), IE_Imp_WordPerfect::openParagraph(), IE_Imp_WordPerfect::openTable(), IE_Imp_WordPerfect::openTableCell(), XAP_Win32AppImpl::openURL(), OO_Style::parse(), OO_PageStyle::parse(), PD_Document::purgeRevisionTable(), IE_Imp_MSWrite::read_pap(), IE_Imp_MSWrite::read_sep(), IE_Imp_MSWrite::read_txt(), s_check_changedDetails(), AP_UnixDialog_FormatTOC::s_NumType_changed(), s_TabLeader_changed(), s_Text_changed(), AP_Win32Dialog_FormatTOC_Layout::saveCtrlsValuesForDetailsLevel(), AP_Dialog_FormatTable::setBackgroundColor(), XAP_App::setDefaultGraphicsId(), SDWCryptor::SetPassword(), AP_Win32Dialog_FormatTOC::setStyle(), AP_UnixDialog_FormatTOC::setStyle(), XAP_Frame::setZoomPercentage(), GR_CairoGraphics::shape(), AD_Document::showHistory(), sMapIcoToColor(), IE_Imp_KWord_1::startElement(), and GOComponentView::update().
UT_String UT_String_sprintf | ( | const char * | inFormat, | |
... | ||||
) |
References UT_String_vprintf().
UT_String UT_String_vprintf | ( | const char * | inFormat, | |
va_list | args1 | |||
) |
References UT_String_vprintf().
References UT_String::c_str(), and UT_String_vprintf().
References UT_String_vprintf().
void UT_UTF8String_addPropertyString | ( | UT_UTF8String & | sPropertyString, | |
const UT_UTF8String & | sNewProp | |||
) |
Assuming a string of standard abiword properties eg. "fred:nerk; table-width:1.0in; table-height:10.in" Add aother propety string, updating previously defined properties with values in the new string.
References UT_UTF8String::size(), UT_UTF8String::substr(), UT_UTF8String_setProperty(), and UT_UTF8String::utf8_str().
UT_UTF8String UT_UTF8String_getPropVal | ( | const UT_UTF8String & | sPropertyString, | |
const UT_UTF8String & | 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. This UT_UTF8String * should be deleted by the calling programming after it is finished with it.
References UT_UTF8String::substr(), UT_ASSERT, UT_SHOULD_NOT_HAPPEN, and UT_UTF8String::utf8_str().
Referenced by AP_Dialog_FormatTOC::getTOCPropVal().
void UT_UTF8String_removeProperty | ( | UT_UTF8String & | sPropertyString, | |
const UT_UTF8String & | 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.
References UT_UTF8String::clear(), UT_UTF8String::size(), UT_UTF8String::substr(), and UT_UTF8String::utf8_str().
Referenced by UT_UTF8String_setProperty().
void UT_UTF8String_setProperty | ( | UT_UTF8String & | sPropertyString, | |
const UT_UTF8String & | sProp, | |||
const UT_UTF8String & | 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_UTF8String::size(), and UT_UTF8String_removeProperty().
Referenced by FL_DocLayout::AnchoredObjectHelper(), FL_DocLayout::loadPendingObjects(), AP_Dialog_FormatTOC::setTOCProperty(), and UT_UTF8String_addPropertyString().
UT_UTF8String& UT_UTF8String_sprintf | ( | UT_UTF8String & | inStr, | |
const char * | inFormat, | |||
... | ||||
) |
References UT_String::c_str(), and UT_String_vprintf().
UT_UTF8String UT_UTF8String_sprintf | ( | const char * | inFormat, | |
... | ||||
) |
References UT_String::c_str(), and UT_String_vprintf().
Referenced by ODe_AbiDocListener::_appendSpaces(), AbiCollab_Command::_doCmdDebug(), s_WML_Listener::_emitTOC(), s_XSL_FO_Listener::_getCellThicknesses(), s_XSL_FO_Listener::_getTableThicknesses(), TCPAccountHandler::_handleAccept(), s_XSL_FO_Listener::_handleDataItems(), s_WML_Listener::_handleDataItems(), s_DocBook_Listener::_handleDataItems(), s_WML_Listener::_handleEmbedded(), s_WML_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_XSL_FO_Listener::_handleMath(), s_DocBook_Listener::_handleMath(), s_XSL_FO_Listener::_handlePageSize(), s_DocBook_Listener::_handlePositionedImage(), s_DocBook_Listener::_handleRevisions(), ODe_Text_Listener::_initDefaultHeadingStyles(), ODe_AbiDocListener::_insertMath(), IE_Exp_HTML_Listener::_insertMath(), IE_Imp_MsWord_97::_insertTOC(), IE_Exp_HTML_Listener::_insertTOC(), IE_Exp_HTML_Listener::_makeStylesheet(), Passepartout_Listener::_openBlock(), OO_Listener::_openBlock(), s_XSL_FO_Listener::_openCell(), IE_Exp_HTML_Listener::_openCell(), s_DocBook_Listener::_openCell(), Passepartout_Listener::_openFont(), IE_Exp_HTML_Listener::_openHeading(), s_DocBook_Listener::_openNestedTable(), ODe_Note_Listener::_openNote(), ODe_Frame_Listener::_openODTextbox(), s_WML_Listener::_openParagraph(), ODe_Text_Listener::_openParagraphDelayed(), s_WML_Listener::_openSection(), s_WML_Listener::_openTable(), IE_Exp_HTML_Listener::_openTable(), s_DocBook_Listener::_openTable(), AccountHandler::_reportProtocolError(), ODe_AutomaticStyles::_storeStyle(), XAP_FrameImpl::_updateTitle(), IE_Exp_RTF::_write_rtf_header(), ODe_ListLevelStyle::_writeListLevelProperties(), ODe_ListLevelStyle::_writeTextProperties(), abi_widget_set_current_page(), AbiMathView_FileInsert(), ODe_FontFaceDecls::addFont(), OO_StylesWriter::addFontDecls(), ODe_AutomaticStyles::addListStyle(), ODe_AutomaticStyles::addPageLayout(), AD_Document::addRevision(), IE_Imp_Psion::applyPageAttributes(), XMPPAccountHandler::authenticate(), ODe_ListLevelStyle::calculateListMargins(), fp_FieldPageCountRun::calculateValue(), fp_FieldPageReferenceRun::calculateValue(), fp_FieldPageNumberRun::calculateValue(), fp_FieldTimeEpochRun::calculateValue(), fp_FieldWordCountRun::calculateValue(), fp_FieldParaCountRun::calculateValue(), fp_FieldLineCountRun::calculateValue(), fp_FieldNonBlankCharCountRun::calculateValue(), fp_FieldCharCountRun::calculateValue(), AbiCollabSessionManager::closeSession(), XMPPAccountHandler::connect(), IE_Imp_XSL_FO::createImage(), IE_Imp_WML::createImage(), IE_Imp_DocBook::createTitle(), AP_UnixDialog_FormatTable::event_BorderThicknessChanged(), AP_UnixDialog_FormatFrame::event_BorderThicknessChanged(), AP_CocoaDialog_FormatTable::event_BorderThicknessChanged, ODe_Style_PageLayout::fetchAttributesFromAbiDoc(), ODe_Style_Style::TableProps::fetchAttributesFromAbiProps(), ODe_Style_Style::ParagraphProps::fetchAttributesFromAbiProps(), ODe_Style_PageLayout::fetchAttributesFromAbiSection(), Save_MailMerge_Listener::fireUpdate(), IE_Imp_Psion::getCharacterAttributes(), fl_TOCLayout::getDefaultDestStyle(), fl_TOCLayout::getDefaultSourceStyle(), XMPPAccountHandler::getDescription(), TCPAccountHandler::getDescription(), ODe_Style_List::getLevelStyle(), ListHelper::getNextLabel(), IE_Imp_Psion::getParagraphAttributes(), ServiceAccountHandler::getShareHint(), getStyleSizeString(), AP_Dialog_FormatTOC::getTOCPropVal(), IE_Imp_RTF::HandlePicture(), AP_Dialog_FormatTOC::incrementIndent(), AP_Dialog_FormatTOC::incrementStartAt(), IE_Exp_HTML_DocumentWriter::insertAnnotations(), IE_Exp_EPUB_EPUB3Writer::insertAnnotations(), IE_Exp_HTML_DocumentWriter::insertEndnotes(), IE_Exp_EPUB_EPUB3Writer::insertEndnotes(), IE_Exp_HTML_DocumentWriter::insertFootnotes(), IE_Exp_EPUB_EPUB3Writer::insertFootnotes(), IE_Imp_Psion::insertImage(), ODe_Text_Listener::insertInlinedImage(), ODe_Text_Listener::insertPositionedImage(), ODe_Table_Cell::loadAbiProps(), OO_StylesWriter::map(), TelepathyChatroom::offerTube(), ODe_Text_Listener::openAnnotation(), IE_Exp_HTML_DocumentWriter::openAnnotation(), IE_Exp_EPUB_EPUB3Writer::openAnnotation(), OO_WriterImpl::openBlock(), ODe_Table_Listener::openCell(), ODe_Text_Listener::openField(), IE_Exp_HTML_DocumentWriter::openField(), ODe_Main_Listener::openSection(), ODe_Text_Listener::openSpan(), OO_WriterImpl::openSpan(), ODe_Table_Listener::openTable(), ODe_Text_Listener::openTOC(), ODe_HeadingSearcher_Listener::openTOC(), Passepartout_Listener::Passepartout_Listener(), AP_CocoaApp::pasteFromClipboard(), fl_DocListener::populateStrux(), AbiCollabSessionManager::processPacket(), AbiCollabSessionManager::removeBuddy(), XAP_Win32Dialog_About::runModal(), s_back_color_changed(), s_canonical_thickness(), s_doZoomDlg(), IE_Exp_RTF::s_escapeString(), s_fore_color_changed(), s_props_append(), SaveBindings_invoke(), XAP_Dialog_HTMLOptions::saveDefaults(), AbiCollabSessionManager::setDocumentHandles(), ODe_Style_List::setLevelStyle(), fp_FrameContainer::setPreferedColumnNo(), fp_FrameContainer::setPreferedPageNo(), XMPPAccountHandler::setup(), sFormatDouble(), IE_Imp_DocBook::startElement(), PD_Document::updateStatus(), UT_createTmpFile(), ODe_Style_Style::ParagraphProps::write(), ODe_Style_PageLayout::write(), ODe_Style_MasterPage::write(), ODe_Style_List::write(), ODe_Numbered_ListLevelStyle::write(), and ODe_Bullet_ListLevelStyle::write().
const char pszEmpty[] = { 0 } [static] |
Referenced by UT_String::c_str(), UT_UCS4String::utf8_str(), and UT_UTF8String::utf8_str().
const UT_UCS4Char ucs4Empty[] = { 0 } [static] |
Referenced by UT_UCS4String::ucs4_str().