Internationalization and localization tools


String Format Function

int vfscanf(FILE *stream, const char *template, va_list ap);

int vfwscanf(FILE *stream, const wchar_t *template, va_list ap);

Internationalization (I18n) Function Overview

The vfscanf function reads formatted input from the stream stream under the control of the template string template. The optional arguments (specified by the argument list pointer ap of type va_list) are pointers to the places that receive the resulting values.

The return value is normally the number of successful assignments. If an end-of-file condition is detected before any matches are performed, including matches against whitespace and literal characters in the template, then EOF is returned.

vfwscanf is the wide-character version of the function; its parameters are wide characters.

I18n Issues

Prior to calling one of these functions, ensure that the current locale is set properly by calling setlocale, as string formatting is dependent on the LC_NUMERIC locale category. See String Formatting in C and C++ for a discussion on locale-sensitive formatting in internationalized applications.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

String Format Functions

 

Lingoport internationalization and localization services and software