NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Go to the source code of this file.
Enumerations | |
enum | TIMESTAMP { GET_ONLY_TIME = 0x1 , GET_AS_TIMESTAMP = 0x2 , GET_WITH_TEXT = 0x4 , GET_MILLISECONDS = 0x8 , GET_FULL_PRECISION = 0x10 } |
enum | ConvertibleType { CONVTYPE_NONE , CONVTYPE_VALUE , CONVTYPE_DATE_TIME , CONVTYPE_LOGICAL } |
enum | TimeDateFormat { TD_NONE = 0x0 , TD_HHMMSS = 0x1 , TD_HHMM = 0x2 , TD_YYMMDD = 0x100 , TD_DDMMYY = 0x200 , TD_DDMM = 0x400 , TD_UTC = 0x10000 , TD_SEP_COLON = 0x100000 , TD_SEP_DOT = 0x200000 , TD_SEP_MINUS = 0x400000 , TD_SEP_SLASH = 0x800000 } |
Functions | |
std::string | toString (int nNumber, const Settings &_option) |
Converts an integer to a string. More... | |
std::string | toString (double dNumber, const Settings &_option) |
Converts a double to a string using the precision from the Settings object. More... | |
std::string | toString (double dNumber, int nPrecision=7) |
Converts a double to a string using the passed precision. More... | |
std::string | toString (const std::complex< double > &dNumber, int nPrecision=7) |
Converts a complex number into a printable string. More... | |
std::string | toString (int) |
Converts an integer to a string without the Settings bloat. More... | |
std::string | toString (__time64_t tTime, int timeStampFlags) |
Converts a time_t to a string. Will actually print a timestamp. More... | |
std::string | toString (sys_time_point tp, int timeStampFlags) |
Converts a sys_time_point to a string. More... | |
std::string | toString (long long int nNumber) |
Converts a long long int to a string. More... | |
std::string | toString (size_t nNumber) |
Converts an unsigned integer to a string. More... | |
std::string | toCmdString (double dNumber) |
Converts a numerical value into a "full" precision string. More... | |
std::string | toCmdString (const std::complex< double > &dNumber) |
Converts a numerical value into a "full" precision string. More... | |
std::string | toString (bool bBoolean) |
Converts a boolean to a string by actually converting the numerical value to "true" and "false" . More... | |
std::string | toHexString (int nNumber) |
Converts an integer to a hexadecimal number printed as string. More... | |
template<class T > | |
std::string | toString (const std::vector< T > &vVector) |
This function converts a std::vector into a std::string, where the components are translated into "{x,y,z...}". More... | |
std::vector< std::string > | toStrVector (std::string sString) |
This function converts a std::string into a std::vector, where the string shall be passed as "{x,y,z,...}". More... | |
std::vector< int > | toIntVector (std::string sString) |
This function converts a std::string into a std::vector, where the string shall be passed as "{x,y,z,...}". More... | |
std::string | condenseText (const std::string &sText) |
Removes vowels and umlauts from the passed string. More... | |
std::string | truncString (const std::string &sText, size_t nMaxChars) |
This function truncates the string to the passed max length (including a trailing ellipsis) or returns it unmodified, if it is shorter. More... | |
std::string | wcstombs (const std::wstring &wStr) |
This function is a wrapper for the usual wcstombs function, which can handle wstrings. More... | |
void | StripSpaces (std::string &) |
Removes leading and trailing white spaces and tabulator characters. More... | |
std::string | toInternalString (std::string sStr) |
Converts a string literal to the internal representation in tables and clusters. More... | |
std::string | toExternalString (std::string sStr) |
Converts an internal string to the external representation in the terminal. More... | |
std::string | toLowerCase (const std::string &sUpperCase) |
Converts uppercase to lowercase letters. More... | |
std::string | toUpperCase (const std::string &sLowerCase) |
Converts lowercase letters to uppercase ones. More... | |
int | StrToInt (const std::string &) |
Converts a string into an integer. More... | |
double | StrToDb (const std::string &) |
Converts a string into a double. More... | |
double | StrToLogical (const std::string &) |
Converts a string into a double considering logical values. More... | |
std::complex< double > | StrToCmplx (const std::string &) |
Converts a string into a complex number. More... | |
sys_time_point | StrToTime (const std::string &) |
Convert a string to a sys_time_point. More... | |
size_t | versionToInt (std::string) |
Converts a version string into a multi-digit integer. More... | |
std::string | intToVersion (size_t) |
Converts a multi-digit integer into a verison string. More... | |
bool | isConvertible (const std::string &sStr, ConvertibleType type=CONVTYPE_VALUE) |
This function checks, whether a string can be converted to the selected ConvertibleType. More... | |
int | detectTimeDateFormat (const std::string &) |
Detects the contained date-time format and returns it as a bitflag composition. More... | |
std::string | toSystemCodePage (std::string sOutput) |
Converts an internal to an external string. Does nothing currently. More... | |
std::string | fromSystemCodePage (std::string sOutput) |
Transforms the system code page to the internal one. More... | |
void | replaceAll (std::string &sToModify, const std::string &sToRep, const std::string &sNewValue, size_t nStart=0, size_t nEnd=std::string::npos) |
This function replaces all occurences of the string sToRep in the string sToModify with the new value sNewValue. The boundaries limit the range of processing. This function is a (slower) overload for std::strings. More... | |
void | replaceAll (std::string &sToModify, const char *sToRep, const char *sNewValue, size_t nStart=0, size_t nEnd=std::string::npos) |
This function replaces all occurences of the string sToRep in the string sToModify with the new value sNewValue. The boundaries limit the range of processing. More... | |
std::string | replaceControlCharacters (std::string sToModify) |
This function is a simple wrapper for replaceAll() and specialized to remove control characters from strings. More... | |
std::string | utf8parser (const std::string &sString) |
Transforms a UTF8 encoded string into a standard ASCII string in the internal code page representation. More... | |
std::string | replacePathSeparator (const std::string &__sPath) |
This function replaces the Windows style path sparators to UNIX style. More... | |
std::string | getTimeStamp (bool bGetStamp=true) |
This function simple returns the current time as a default timestamp. More... | |
std::vector< std::string > | split (const std::string &sStr, char cSplit) |
Splits a vector at the selected characters. More... | |
std::string | ellipsize (const std::string &sLongString, size_t nMaxStringLength=1024) |
Shortens the passed string by introducing a ellipsis in the middle of the string, if the string is longer than the maximal string length. More... | |
bool | isEqualStripped (StringView str1, StringView str2) |
Returns true, if the contents of the strings are equal, if all surrounding whitespaces will be stripped. More... | |
enum ConvertibleType |
Enumerator | |
---|---|
CONVTYPE_NONE | |
CONVTYPE_VALUE | |
CONVTYPE_DATE_TIME | |
CONVTYPE_LOGICAL |
Definition at line 41 of file stringtools.hpp.
enum TimeDateFormat |
Enumerator | |
---|---|
TD_NONE | |
TD_HHMMSS | |
TD_HHMM | |
TD_YYMMDD | |
TD_DDMMYY | |
TD_DDMM | |
TD_UTC | |
TD_SEP_COLON | |
TD_SEP_DOT | |
TD_SEP_MINUS | |
TD_SEP_SLASH |
Definition at line 49 of file stringtools.hpp.
enum TIMESTAMP |
Enumerator | |
---|---|
GET_ONLY_TIME | |
GET_AS_TIMESTAMP | |
GET_WITH_TEXT | |
GET_MILLISECONDS | |
GET_FULL_PRECISION |
Definition at line 32 of file stringtools.hpp.
std::string condenseText | ( | const std::string & | sText | ) |
Removes vowels and umlauts from the passed string.
sText | const std::string& |
Definition at line 412 of file stringtools.cpp.
Referenced by createOutputForHist1D().
int detectTimeDateFormat | ( | const std::string & | sStr | ) |
Detects the contained date-time format and returns it as a bitflag composition.
sStr | const std::string& |
Definition at line 1175 of file stringtools.cpp.
References date::format(), isDatePattern_DE(), isDatePattern_US(), isTimePattern(), TD_HHMMSS, TD_NONE, TD_SEP_COLON, TD_SEP_MINUS, TD_UTC, and TD_YYMMDD.
Referenced by StrToTime().
std::string ellipsize | ( | const std::string & | sLongString, |
size_t | nMaxStringLength | ||
) |
Shortens the passed string by introducing a ellipsis in the middle of the string, if the string is longer than the maximal string length.
sLongString | const std::string& |
nMaxStringLength | size_t |
Definition at line 1420 of file stringtools.cpp.
Referenced by NumeReDebugger::getGlobals(), NumeRe::Cluster::getShortVectorRepresentation(), and NumeReKernel::getVariableList().
std::string fromSystemCodePage | ( | std::string | sOutput | ) |
Transforms the system code page to the internal one.
sOutput | std::string |
Definition at line 1267 of file stringtools.cpp.
std::string getTimeStamp | ( | bool | bGetStamp | ) |
This function simple returns the current time as a default timestamp.
bGetStamp | bool |
Definition at line 1373 of file stringtools.cpp.
References GET_AS_TIMESTAMP, GET_WITH_TEXT, and toString().
Referenced by NumeReHistory::addHeader(), createTeXExport(), fitDataSet(), NumeRe::FileAdapter::getDate(), NumeReEditor::getTemplateContent(), NumeReWindow::NewFile(), prepareTemplate(), Script::startInstallation(), NumeReKernel::StartUp(), NumeRe::TextDataFile::writeHeader(), NumeRe::LaTeXTable::writeHeader(), and Procedure::writeProcedure().
std::string intToVersion | ( | size_t | nVersionDigits | ) |
Converts a multi-digit integer into a verison string.
nVersionDigits | size_t |
Definition at line 815 of file stringtools.cpp.
References toString().
Referenced by incrementVersion().
bool isConvertible | ( | const std::string & | sStr, |
ConvertibleType | type | ||
) |
This function checks, whether a string can be converted to the selected ConvertibleType.
sStr | const std::string& |
type | ConvertibleType |
Definition at line 1009 of file stringtools.cpp.
References CONVTYPE_DATE_TIME, CONVTYPE_LOGICAL, CONVTYPE_VALUE, isConvertible(), isDateTimePattern(), and toLowerCase().
Referenced by StringColumn::convert(), CategoricalColumn::convert(), NumeRe::ClusterStringItem::getDouble(), isConvertible(), NumeRe::GenericFile::isNumeric(), NumeRe::Table::isNumerical(), CellValueShaderDialog::OnButtonClick(), NumeRe::CommaSeparatedValues::readFile(), NumeRe::ClusterDoubleItem::setString(), ValueColumn::setValue(), DateTimeColumn::setValue(), LogicalColumn::setValue(), NumeRe::Table::setValueAsString(), strfnc_textparse(), and strfnc_to_time().
bool isEqualStripped | ( | StringView | str1, |
StringView | str2 | ||
) |
Returns true, if the contents of the strings are equal, if all surrounding whitespaces will be stripped.
str1 | StringView |
str2 | StringView |
Definition at line 1574 of file stringtools.cpp.
References StringViewBase::strip().
Referenced by evalMatOp().
void replaceAll | ( | std::string & | sToModify, |
const char * | sToRep, | ||
const char * | sNewValue, | ||
size_t | nStart, | ||
size_t | nEnd | ||
) |
This function replaces all occurences of the string sToRep in the string sToModify with the new value sNewValue. The boundaries limit the range of processing.
sToModify | std::string& |
sToRep | const char* |
sNewValue | const char* |
nStart | size_t |
nEnd | size_t |
Definition at line 1443 of file stringtools.cpp.
Referenced by NumeRe::addLinebreaks(), NumeReEditor::AddProcedureDocumentation(), applySyntaxHighlighting(), StringColumn::convert(), CategoricalColumn::convert(), createCssString(), DocumentationGenerator::createMainProcedure(), DocumentationGenerator::createParametersTable(), DocumentationGenerator::createReturnsTable(), NumeRe::StringParser::createTerminalOutput(), NumeRe::TextDataFile::decodeTableHeads(), Dependencies::Dependencies(), PackageRepoBrowser::DetectInstalledPackages(), NumeReKernel::failMessage(), formatNumberToTex(), getHighlightedCode(), NumeReKernel::getPluginLanguageStrings(), NumeReKernel::issueWarning(), listDirectory(), NumeRe::StringParser::maskControlCharacters(), newObject(), NumeReWindow::OnCreatePackage(), openExternally(), DocumentationGenerator::parseDocumentation(), parseEventOpt(), parseLayoutCommand(), parseLayoutScript(), PackageRepoBrowser::populatePackageList(), NumeRe::TextDataFile::readFile(), readFromFile(), NumeRe::JcampDX::readTable(), replaceControlCharacters(), Dependencies::resolveProcedureCalls(), FlowCtrl::setCommand(), strfnc_replaceall(), strfnc_textparse(), toExternalString(), urlExecute(), versionToInt(), and Script::writeWholeFile().
void replaceAll | ( | std::string & | sToModify, |
const std::string & | sToRep, | ||
const std::string & | sNewValue, | ||
size_t | nStart, | ||
size_t | nEnd | ||
) |
This function replaces all occurences of the string sToRep in the string sToModify with the new value sNewValue. The boundaries limit the range of processing. This function is a (slower) overload for std::strings.
sToModify | std::string& |
sToRep | const std::string& |
sNewValue | const std::string& |
nStart | size_t |
nEnd | size_t |
Definition at line 1490 of file stringtools.cpp.
std::string replaceControlCharacters | ( | std::string | sToModify | ) |
This function is a simple wrapper for replaceAll() and specialized to remove control characters from strings.
sToModify | std::string |
Definition at line 1531 of file stringtools.cpp.
References replaceAll().
Referenced by NumeReDebugger::decodeType(), NumeReDebugger::getGlobals(), GridNumeReTable::GetValue(), NumeReKernel::getVariableList(), and TableViewer::SetData().
std::string replacePathSeparator | ( | const std::string & | __sPath | ) |
This function replaces the Windows style path sparators to UNIX style.
__sPath | const std::string& |
Definition at line 1548 of file stringtools.cpp.
std::vector< std::string > split | ( | const std::string & | sStr, |
char | cSplit | ||
) |
Splits a vector at the selected characters.
sStr | const std::string& |
cSplit | char |
Definition at line 1388 of file stringtools.cpp.
Referenced by date::detail::Rule::split_overlaps(), and StrToTime().
void StripSpaces | ( | std::string & | sToStrip | ) |
Removes leading and trailing white spaces and tabulator characters.
sToStrip | std::string& |
Definition at line 463 of file stringtools.cpp.
Referenced by StrToTime().
std::complex< double > StrToCmplx | ( | const std::string & | sString | ) |
Converts a string into a complex number.
sString | std::string& const |
Definition at line 528 of file stringtools.cpp.
References fast_float::from_chars_result::ec, fast_float::from_chars(), fast_float::from_chars_result::ptr, and toLowerCase().
Referenced by TableViewer::CellToCmplx(), StringColumn::convert(), CategoricalColumn::convert(), NumeRe::ClusterStringItem::getDouble(), CellValueShaderDialog::OnButtonClick(), NumeRe::ClusterDoubleItem::setString(), ValueColumn::setValue(), NumeRe::Table::setValueAsString(), strfnc_textparse(), and StrToLogical().
double StrToDb | ( | const std::string & | sString | ) |
Converts a string into a double.
sString | const std::string& |
Definition at line 495 of file stringtools.cpp.
Referenced by NumeRe::CassyLabx::extractValueFromTag(), getIntervalDef(), CommandLineParser::getParameterValueAsNumericalValue(), DuplicateCodeDialog::OnColumnHeaderClick(), NumeRe::JcampDX::parseLine(), NumeRe::StringParser::parseStringsInIndices(), plugin_histogram(), prepareTicksForHist1d(), NumeRe::JcampDX::readFile(), and NumeRe::JcampDX::readTable().
int StrToInt | ( | const std::string & | sString | ) |
Converts a string into an integer.
sString | const std::string& |
Definition at line 482 of file stringtools.cpp.
Referenced by StrToTime(), toIntVector(), and versionToInt().
double StrToLogical | ( | const std::string & | sString | ) |
Converts a string into a double considering logical values.
sString | const std::string& |
Definition at line 509 of file stringtools.cpp.
References StrToCmplx(), and toLowerCase().
Referenced by StringColumn::convert(), CategoricalColumn::convert(), LogicalColumn::setValue(), and NumeRe::Table::setValueAsString().
sys_time_point StrToTime | ( | const std::string & | sString | ) |
Convert a string to a sys_time_point.
sString | const std::string& |
Definition at line 626 of file stringtools.cpp.
References detectTimeDateFormat(), date::format(), getTimePointFromTimeStamp(), getTimeStampFromTimePoint(), intPower(), time_stamp::m_hours, time_stamp::m_microsecs, time_stamp::m_millisecs, time_stamp::m_minutes, time_stamp::m_seconds, time_stamp::m_ymd, split(), StripSpaces(), StrToInt(), sys_time_now(), TD_DDMM, TD_DDMMYY, TD_HHMM, TD_HHMMSS, TD_NONE, TD_SEP_MINUS, TD_SEP_SLASH, TD_YYMMDD, and date::year_month_day::year().
Referenced by StringColumn::convert(), CategoricalColumn::convert(), CellValueShaderDialog::OnButtonClick(), DateTimeColumn::setValue(), NumeRe::Table::setValueAsString(), strfnc_textparse(), and strfnc_to_time().
std::string toCmdString | ( | const std::complex< double > & | dNumber | ) |
Converts a numerical value into a "full" precision string.
dNumber | const std::complex<double>& |
Definition at line 325 of file stringtools.cpp.
References toString().
std::string toCmdString | ( | double | dNumber | ) |
Converts a numerical value into a "full" precision string.
dNumber | double |
Definition at line 308 of file stringtools.cpp.
Referenced by calculatePercentageAvgAndCreateParserVariables(), NumeRe::StringParser::createStringOutput(), evaluateParameterValues(), NumeRe::StringVarFactory::evaluateStringVectors(), DateTimeColumn::getValueAsString(), replaceDataEntities(), replaceEntityOccurence(), strfnc_getfileinfo(), strfnc_to_time(), and NumeRe::Cluster::to_string().
std::string toExternalString | ( | std::string | sStr | ) |
Converts an internal string to the external representation in the terminal.
sStr | std::string |
Definition at line 881 of file stringtools.cpp.
References replaceAll().
Referenced by NumeReDebugger::gatherLoopBasedInformations(), NumeReDebugger::getGlobals(), NumeRe::ClusterDoubleItem::getString(), NumeRe::ClusterStringItem::getString(), StringColumn::getValueAsStringLiteral(), and NumeReKernel::getVariableList().
std::string toHexString | ( | int | nNumber | ) |
Converts an integer to a hexadecimal number printed as string.
nNumber | int |
Definition at line 339 of file stringtools.cpp.
References fast_float::hex.
Referenced by mu::ParserByteCode::AsciiDump(), and NumeReKernel::initializeStackTracker().
std::string toInternalString | ( | std::string | sStr | ) |
Converts a string literal to the internal representation in tables and clusters.
sStr | std::string |
Definition at line 844 of file stringtools.cpp.
Referenced by ProcedureVarFactory::createLocalInlineStrings(), StringVector::makeLocalString(), CommandLineParser::parseExprAsString(), NumeRe::ClusterDoubleItem::setString(), ValueColumn::setValue(), DateTimeColumn::setValue(), and LogicalColumn::setValue().
std::vector< int > toIntVector | ( | std::string | sString | ) |
This function converts a std::string into a std::vector, where the string shall be passed as "{x,y,z,...}".
sString | std::string |
Definition at line 387 of file stringtools.cpp.
References StrToInt(), and toStrVector().
Referenced by NumeReWindow::prepareSession().
std::string toLowerCase | ( | const std::string & | sUpperCase | ) |
Converts uppercase to lowercase letters.
sUpperCase | const std::string& |
Definition at line 896 of file stringtools.cpp.
Referenced by isConvertible(), StrToCmplx(), and StrToLogical().
std::string toString | ( | __time64_t | tTime, |
int | timeStampFlags | ||
) |
Converts a time_t to a string. Will actually print a timestamp.
tTime | __time64_t |
timeStampFlags | int |
Definition at line 150 of file stringtools.cpp.
References _lang, Language::get(), GET_AS_TIMESTAMP, GET_ONLY_TIME, GET_WITH_TEXT, and getCurrentTimeZone().
std::string toString | ( | bool | bBoolean | ) |
Converts a boolean to a string by actually converting the numerical value to "true"
and "false"
.
bBoolean | bool |
Definition at line 291 of file stringtools.cpp.
std::string toString | ( | const std::complex< double > & | dNumber, |
int | nPrecision | ||
) |
Converts a complex number into a printable string.
dNumber | const std::complex<double>& |
nPrecision | int |
Definition at line 90 of file stringtools.cpp.
References mu::isinf(), mu::isnan(), and mu::rint().
std::string toString | ( | const std::vector< T > & | vVector | ) |
This function converts a std::vector into a std::string, where the components are translated into "{x,y,z...}".
vVector | const std::vector<T>& |
Definition at line 91 of file stringtools.hpp.
References toString().
std::string toString | ( | double | dNumber, |
const Settings & | _option | ||
) |
Converts a double to a string using the precision from the Settings object.
dNumber | double |
_option | const Settings& |
Definition at line 58 of file stringtools.cpp.
References Settings::getPrecision(), and toString().
std::string toString | ( | double | dNumber, |
int | nPrecision | ||
) |
Converts a double to a string using the passed precision.
dNumber | double |
nPrecision | int |
Definition at line 73 of file stringtools.cpp.
std::string toString | ( | int | nNumber, |
const Settings & | _option | ||
) |
Converts an integer to a string.
nNumber | int |
_option | const Settings& |
Definition at line 43 of file stringtools.cpp.
References toString().
Referenced by getTimeStamp(), intToVersion(), toCmdString(), and toString().
std::string toString | ( | int | nNumber | ) |
Converts an integer to a string without the Settings bloat.
nNumber | int |
Definition at line 121 of file stringtools.cpp.
std::string toString | ( | long long int | nNumber | ) |
Converts a long long int to a string.
nNumber | long longint |
Definition at line 274 of file stringtools.cpp.
std::string toString | ( | size_t | nNumber | ) |
Converts an unsigned integer to a string.
nNumber | size_t |
Definition at line 135 of file stringtools.cpp.
References toString().
std::string toString | ( | sys_time_point | tp, |
int | timeStampFlags | ||
) |
Converts a sys_time_point to a string.
tp | sys_time_point |
timeStampFlags | int |
Definition at line 210 of file stringtools.cpp.
References _lang, date::year_month_day::day(), Language::get(), GET_AS_TIMESTAMP, GET_FULL_PRECISION, GET_MILLISECONDS, GET_ONLY_TIME, GET_WITH_TEXT, getCurrentTimeZone(), getTimeStampFromTimePoint(), time_stamp::m_hours, time_stamp::m_microsecs, time_stamp::m_millisecs, time_stamp::m_minutes, time_stamp::m_seconds, time_stamp::m_ymd, date::year_month_day::month(), and date::year_month_day::year().
std::vector< std::string > toStrVector | ( | std::string | sString | ) |
This function converts a std::string into a std::vector, where the string shall be passed as "{x,y,z,...}".
sString | std::string |
Definition at line 356 of file stringtools.cpp.
References getNextArgument().
Referenced by CellValueShaderDialog::OnButtonClick(), and toIntVector().
std::string toSystemCodePage | ( | std::string | sOutput | ) |
Converts an internal to an external string. Does nothing currently.
sOutput | std::string |
Definition at line 1253 of file stringtools.cpp.
std::string toUpperCase | ( | const std::string & | sLowerCase | ) |
Converts lowercase letters to uppercase ones.
sLowerCase | const std::string& |
Definition at line 932 of file stringtools.cpp.
Referenced by analyzePulse(), applyCommandHeuristics(), applyFunctionHeuristics(), SearchController::CleanDocumentation(), NumeRe::CleanDocumentation(), cmd_get(), cmd_set(), createListDirectoryHeader(), createOutputForHist1D(), createOutputForHist2D(), createStatsOutput(), doc_HelpAsHTML(), doc_SearchFct(), NumeRe::XLSXSpreadSheet::evalIndices(), fitDataSet(), NumeReEditor::generateAutoCompList(), NumeRe::CallTipProvider::getCommand(), NumeRe::CallTipProvider::getConstant(), NumeRe::CallTipProvider::getFunction(), NumeReKernel::getFunctionLanguageStrings(), NumeRe::CallTipProvider::getMethod(), NumeRe::CallTipProvider::getOption(), NumeReKernel::getPluginLanguageStrings(), NumeRe::CallTipProvider::getPredef(), listCommands(), listConstants(), listDeclaredVariables(), listDefinitions(), listDirectory(), listFiles(), listFunctions(), listInstalledPlugins(), listLogicalOperators(), listUnitConversions(), NumeReKernel::MainLoop(), NumeReEditor::OnChangeCase(), NumeReEditor::OnMouseDwell(), NumeReWindow::OnTreeItemToolTip(), NumeReWindow::prepareFunctionTree(), NumeRe::JcampDX::readTable(), sectionHeadline(), EditorNotebook::SetTabText(), show_data(), strfnc_to_uppercase(), NumeReWindow::UpdateStatusBar(), and Procedure::writeProcedure().
std::string truncString | ( | const std::string & | sText, |
size_t | nMaxChars | ||
) |
This function truncates the string to the passed max length (including a trailing ellipsis) or returns it unmodified, if it is shorter.
sText | const std::string& |
nMaxChars | size_t |
Definition at line 446 of file stringtools.cpp.
Referenced by NumeReKernel::formatResultOutput().
std::string utf8parser | ( | const std::string & | sString | ) |
Transforms a UTF8 encoded string into a standard ASCII string in the internal code page representation.
sString | const std::string& |
Definition at line 1307 of file stringtools.cpp.
Referenced by NumeRe::TextDataFile::decodeTableHeads(), NumeRe::CassyLabx::readFile(), NumeRe::CommaSeparatedValues::readFile(), NumeRe::OpenDocumentSpreadSheet::readFile(), NumeRe::XLSSpreadSheet::readFile(), and NumeRe::XLSXSpreadSheet::readFile().
size_t versionToInt | ( | std::string | sVersion | ) |
Converts a version string into a multi-digit integer.
sVersion | std::string |
Definition at line 795 of file stringtools.cpp.
References replaceAll(), StrToInt(), and sVersion.
Referenced by PackageRepoBrowser::DetectInstalledPackages(), Script::handleInstallInformation(), and incrementVersion().
std::string wcstombs | ( | const std::wstring & | wStr | ) |
This function is a wrapper for the usual wcstombs function, which can handle wstrings.
wStr | const std::wstring& |
Definition at line 1222 of file stringtools.cpp.
References wcstombs().
Referenced by YExcel::LargeString::ContinueRead(), YCompoundFiles::Block::Create(), YCompoundFiles::Block::Open(), YCompoundFiles::CompoundFile::PresentWorkingDirectory(), NumeRe::XLSSpreadSheet::readFile(), and wcstombs().