const String* args[] = {&arg1, &arg2};
return string_format_strings(fmt, args, 2);
}
-
-int string_stoi(const String& str, size_t *idx/* = 0*/, int base/* = 10*/)
-{
- int val;
- const TCHAR *begin = str.c_str();
- TCHAR *endptr = NULL;
-#ifdef _UNICODE
- val = wcstol(begin, &endptr, base);
-#else
- val = strtol(begin, &endptr, base);
-#endif
- if (endptr == begin)
- throw std::invalid_argument("string_stoi");
- else if (errno == ERANGE)
- throw std::out_of_range("string_stoi");
- if (idx)
- *idx = endptr - begin;
- return val;
-}
-
String string_format_string1(const String& fmt, const String& arg1);
String string_format_string2(const String& fmt, const String& arg1, const String& arg2);
-int string_stoi(const String& str, size_t *idx = 0, int base = 10);
-
template <class InputIterator>
String string_join(const InputIterator& begin, const InputIterator& end, const String& delim)
{
{
String codepage;
q = EatParam(q, codepage);
- try { m_nCodepage = string_stoi(codepage); } catch (...) { /* FIXME: */ }
+ try { m_nCodepage = std::stoi(codepage); } catch (...) { /* FIXME: */ }
}
else if (param == _T("ignorews"))
{
pCurrentView = GetGroupView(m_nThisPane);
int num = 0;
- try { num = string_stoi(dlg.m_strParam) - 1; } catch(...) {}
+ try { num = std::stoi(dlg.m_strParam) - 1; } catch(...) {}
if (dlg.m_nGotoWhat == 0)
{
{
String contextText;
m_comboContext.GetLBText(contextSel, PopString(contextText));
- m_contextLines = string_stoi(contextText);
+ m_contextLines = std::stoi(contextText);
}
else
m_contextLines = 0;
String valueAsText;
pEdit->GetWindowText(PopString(valueAsText));
int value = 0;
- try { value = string_stoi(valueAsText); } catch (...) {};
+ try { value = std::stoi(valueAsText); } catch (...) {};
if (value < 1 || value > MAX_TABSIZE)
{
String msg = string_format_string1(
// Check if this instance of WM is still running
try
{
- int pid = string_stoi(tempfolderPID);
+ int pid = std::stoi(tempfolderPID);
if (!WMrunning(processIDs, pid))
{
tempfolderPID = paths_ConcatPath(paths_GetParentPath(pattern), ff.cFileName);