| | 1 | = StrFmt = |
| | 2 | Convert string to floating point number |
| | 3 | |
| | 4 | {{{ |
| | 5 | string StrFmt(const char* pszFmt, ...); |
| | 6 | }}} |
| | 7 | |
| | 8 | == Parameters == |
| | 9 | |
| | 10 | * pszFmt - character array of formatting information |
| | 11 | * ... - variable number of parameters to fill in formatting specifiers |
| | 12 | |
| | 13 | == Return Value == |
| | 14 | |
| | 15 | * Returns the formatted string |
| | 16 | |
| | 17 | == Remarks == |
| | 18 | |
| | 19 | This is basically a wrapper around sprintf to provide the flexibility of formatting with some safety measures built in. If string parameters are used the ".c_str()" method will be needed to convert this to C style strings. |
| | 20 | |
| | 21 | == Example == |
| | 22 | |
| | 23 | {{{ |
| | 24 | string strMsg; |
| | 25 | strID = "123"; |
| | 26 | strMsg = StrFmt("ID: %s", strID.c_str()); |
| | 27 | }}} |
| | 28 | |
| | 29 | |
| | 30 | == See Also == |
| | 31 | |
| | 32 | * StrToInt |
| | 33 | * StrToFloat |
| | 34 | |