A format character may be preceded by an integral repeat count; e.g.\
the format string \code{'4h'} means exactly the same as \code{'hhhh'}.
+Whitespace characters between formats are ignored; a count and its
+format must not contain whitespace though.
+
For the \code{'s'} format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
characters; e.g. \code{'10s'} means a single 10-byte string, while
A format character may be preceded by an integral repeat count; e.g.\
the format string \code{'4h'} means exactly the same as \code{'hhhh'}.
+Whitespace characters between formats are ignored; a count and its
+format must not contain whitespace though.
+
For the \code{'s'} format character, the count is interpreted as the
size of the string, not a repeat count like for the other format
characters; e.g. \code{'10s'} means a single 10-byte string, while
#include "mymath.h"
#include <limits.h>
+#include <ctype.h>
/* Exception */
s = fmt;
size = 0;
while ((c = *s++) != '\0') {
+ if (isspace(c))
+ continue;
if ('0' <= c && c <= '9') {
num = c - '0';
while ('0' <= (c = *s++) && c <= '9') {
res = restart = PyString_AsString(result);
while ((c = *s++) != '\0') {
+ if (isspace(c))
+ continue;
if ('0' <= c && c <= '9') {
num = c - '0';
while ('0' <= (c = *s++) && c <= '9')
str = start;
s = fmt;
while ((c = *s++) != '\0') {
+ if (isspace(c))
+ continue;
if ('0' <= c && c <= '9') {
num = c - '0';
while ('0' <= (c = *s++) && c <= '9')