Changes between Version 8 and Version 9 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/String/StrFmt


Ignore:
Timestamp:
04/13/23 06:59:25 (13 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/String/StrFmt

    v8 v9  
    44{{{
    55string StrFmt(const char* pszFmt, ...);
     6
     7void StrFmt(string& str, const char* pszFmt, ...);
    68}}}
    79
     
    2931}}}
    3032
     33The version of StrFmt shown below that takes a reference to the string as a parameter is more efficient. This is because it doesn't have to create the string, and pass it as a return value to tbe recreated.
     34{{{
     35int nVal = 123;
     36string strID = "ABC";
     37
     38string strMsg;
     39StrFmt(strMsg, "Number: %d ID: %s", nVal, strID.c_str());
     40}}}
     41
    3142
    3243== See Also ==