VOID Console::Format( LPCWSTR wstrFormat, ... ) { va_list pArgList; va_start( pArgList, wstrFormat ); FormatV( wstrFormat, pArgList ); va_end( pArgList ); }
String String::Format(const char * format, ...){ va_list ap; va_start(ap, format); String r = FormatV(format, ap); va_end(ap); return r; }
void LogError( const char* format, ... ) { va_list vl; va_start(vl, format); LogRaw(LogLevel_Error, FormatV(format, vl).c_str()); va_end(vl); }
VOID Console::Format( _In_z_ _Printf_format_string_ LPCWSTR wstrFormat, ... ) { va_list pArgList; va_start( pArgList, wstrFormat ); FormatV( wstrFormat, pArgList ); va_end( pArgList ); }
void CString::Format(PCTSTR szFormat, ...) { va_list argList; va_start(argList, szFormat); FormatV(szFormat, argList); va_end(argList); }
void LogWarning( const char* format, ... ) { va_list vl; va_start(vl, format); LogRaw(LogLevel_Warning, FormatV(format, vl).c_str()); va_end(vl); }
void _cdecl CGString::Format( LPCTSTR pStr, ... ) { va_list vargs; va_start( vargs, pStr ); FormatV( pStr, vargs ); va_end( vargs ); }
/////////////////////////////////////////////////////////////////////////////// // Formatstring werden aus einer Resource gelesen void __cdecl Format (string& rStr, ResID idFormat, ...) { va_list argList; va_start(argList, idFormat); FormatV(rStr, idFormat, argList); va_end(argList); }
csStringBase &csStringBase::Format (const char* format, ...) { va_list args; va_start (args, format); FormatV (format, args); va_end (args); return *this; }
void DoTraceFmt(const wchar_t * SourceFile, const wchar_t * Func, uintptr_t Line, const wchar_t * AFormat, va_list Args) { DebugAssert(IsTracing); UnicodeString Message = FormatV(AFormat, Args); DoTrace(SourceFile, Func, Line, Message.c_str()); }
std::vector<wchar_t> CXmlWriter::Format(LPCWSTR lpszFormat, ...) { va_list args; va_start(args, lpszFormat); std::vector<wchar_t> buf = FormatV(lpszFormat, args); va_end(args); return buf; }
bool z_string::Format(ctext pFormat,...) { va_list ArgList; va_start(ArgList,pFormat); FormatV(pFormat,ArgList); va_end(ArgList); return true; }
std::wstring StringUtils::Format(const wchar_t *fmt, ...) { va_list args; va_start(args, fmt); std::wstring str = FormatV(fmt, args); va_end(args); return str; }
int Format(String &Str,LPCWSTR pszFormat, ...) { va_list Args; va_start(Args,pszFormat); int Length=FormatV(Str,pszFormat,Args); va_end(Args); return Length; }
HRESULT CXmlWriter::WriteCData( _In_opt_ LPCWSTR pwszFormat, ...) { va_list args; va_start(args, pwszFormat); std::vector<wchar_t> buf = FormatV(pwszFormat, args); va_end(args); SetError( m_pWriter->WriteCData(&buf[0]) ); return GetError(); }
/* * @implemented */ void CHString::Format(LPCWSTR lpszFormat, ...) throw (CHeap_Exception) { // Forward to FormatV va_list ArgsList; va_start(ArgsList, lpszFormat); FormatV(lpszFormat, ArgsList); va_end(ArgsList); }
/////////////////////////////////////////////////////////////////////////////////////////////// // Pendant zu wsprintf() für string-Parameter; // die in beliebiger Anzahl übergebenen Parameter werden auf den Stack gelegt void __cdecl Format (string& rStr, LPCTSTR lpszFormat, ...) { TX_ASSERT (TIsValidString(lpszFormat, false)); va_list argList; va_start(argList, lpszFormat); FormatV(rStr, lpszFormat, argList); va_end(argList); }
int CUtlString::Format( const char *pFormat, ... ) { va_list marker; va_start( marker, pFormat ); int len = FormatV( pFormat, marker ); va_end( marker ); return len; }
FarString& FarString::Format( int nFmtLangId, ... ) { va_list argList; va_start( argList, nFmtLangId ); FormatV( Far::GetMsg( nFmtLangId ), argList ); va_end( argList ); return * this; }
void LogWriter::Warning(const wxString fmt, ...) { va_list list; va_start(list, fmt); const wxString& frmt = FormatV(fmt, list); va_end(list); WriteToLog("W", frmt, "Yellow"); }
void LogWriter::Error(const wxString fmt, ...) { va_list list; va_start(list, fmt); const wxString& frmt = FormatV(fmt, list); va_end(list); WriteToLog("E", frmt, "Red"); }
// --------------------------------------------------------------------------------------- // FUNCTION: CString::Format // void _cdecl Formst(CString& PCTSTR szFormat, ...) // void _cdecl Format(PCTSTR szFormat); // // DESCRIPTION: // This function does sprintf/wsprintf style formatting on CString objects. It // is very much a copy of the MFC CString::Format function. Some people might even // call this identical. However all these people are now dead. // // PARAMETERS: // nId - ID of string resource holding the format string // szFormat - a PCTSTR holding the format specifiers // argList - a va_list holding the arguments for the format specifiers. // // RETURN VALUE: None. // --------------------------------------------------------------------------------------- // formatting (using wsprintf style formatting) void CString::Format(UINT nId, ...) { va_list argList; va_start(argList, nId); CString strFmt; if ( strFmt.Load(nId) ) FormatV(strFmt, argList); va_end(argList); }
void LogWriter::Write(const wxString fmt, ...) { va_list list; va_start(list, fmt); const wxString& frmt = FormatV(fmt, list); va_end(list); WriteToLog("!", frmt, "White"); }
FarString& FarString::Format( const char * Fmt, ... ) { far_assert( Fmt != NULL ); va_list argList; va_start( argList, Fmt ); FormatV( Fmt, argList ); va_end( argList ); return * this; }
BOOL CNktStringW::Format(__in_z LPCWSTR szFormatW, ...) { va_list argptr; BOOL b; Empty(); if (szFormatW == NULL) return FALSE; va_start(argptr, szFormatW); b = FormatV(szFormatW, argptr); va_end(argptr); return b; }
HRESULT CXmlWriter::WriteAttributeString( _In_opt_ LPCWSTR pwszPrefix, _In_opt_ LPCWSTR pwszLocalName, _In_opt_ LPCWSTR pwszNamespaceUri, _In_opt_ LPCWSTR pwszFormat, ...) { va_list args; va_start(args, pwszFormat); std::vector<wchar_t> buf = FormatV(pwszFormat, args); va_end(args); SetError( m_pWriter->WriteAttributeString(pwszPrefix, pwszLocalName, pwszNamespaceUri, &buf[0]) ); return GetError(); }
int CUIString::Format(LPCWSTR lpFormat, ...) { int nRet; va_list Args; // // just call FormatV // va_start(Args, lpFormat); nRet = FormatV(lpFormat, Args); va_end(Args); return nRet; }
os_string FakeTRiASName (LPCSTR pcTempl, ...) { try { va_list params; os_string strRes; va_start (params, pcTempl); FormatV (strRes, pcTempl, params); va_end (params); return strRes; } catch (...) { // irgendein Fehler return os_string(""); } }
os_string FakeTRiASName (ResID resID, ...) { try { ResString resTempl (resID, _MAX_PATH); va_list params; os_string strRes; va_start (params, resID); FormatV (strRes, resTempl, params); va_end (params); return strRes; } catch (...) { // irgendein Fehler return os_string(""); } }
std::string fmt::FormatV(std::string fmt, va_list args) { std::string str = FormatV(fmt.c_str(), args); return str; }