sprintf() wrapper that is not sensitive to LC_NUMERIC settings. * * This function has the same contract as standard sprintf(), except that * formatting of floating-point numbers will use decimal point, whatever the * current locale is set. * * @param str output buffer (must be large enough to hold the result) * @param fmt formatting string * @param ... arguments * @return the num
| 1373 | ` * output buffer. |
| 1374 | */ |
| 1375 | int CPLsprintf(char *str, CPL_FORMAT_STRING(const char *fmt), ...) |
| 1376 | { |
| 1377 | va_list args; |
| 1378 | |
| 1379 | va_start(args, fmt); |
| 1380 | const int ret = CPLvsnprintf(str, INT_MAX, fmt, args); |
| 1381 | va_end(args); |
| 1382 | return ret; |
| 1383 | } |
| 1384 | |
| 1385 | /************************************************************************/ |
| 1386 | /* CPLprintf() */ |
no test coverage detected