Internationalization and localization tools


String Format Function

int vsscanf(const char *s, const char *template, va_list ap);

int vswscanf(const wchar_t *s, const wchar_t *template, va_list ap);

Internationalization (I18n) Function Overview

The vsscanf function reads formatted input from string s 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. The behavior of sscanf is undefined if copying takes place between strings that overlap.

vswscanf is the wide character version of vsscanf; its arguments are wide-character strings.

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