open-index/open-npm huggingface dataset:
npm package: @k14v/printf-tokenize
Description: printf format string tokenize
Latest version: 0.0.6

# printf-tokenize
Javascript printf tokenize creates a array of tokens using the standard from `cplusplus` http://www.cplusplus.com/reference/cstdio/printf/ to parse flags.

```javascript
const tokenize = require('@k14v/printf-tokenize')

tokenize('This is %s test with %d flags')

/*
[ { type: 'Literal', value: 'This is ', start: 0, end: 8, length: 8 },
  { type: 'Parameter',
    value: '%s',
    start: 8,
    end: 10,
    length: 2,
    kind: 'String',
    specifier: 's' },
  { type: 'Literal',
    value: ' test with ',
    start: 10,
    end: 21,
    length: 11 },
  { type: 'Parameter',
    value: '%d',
    start: 21,
    end: 23,
    length: 2,
    kind: 'Number',
    specifier: 'd',
    variant: 'Integer' },
  { type: 'Literal', value: ' flags', start: 23, end: 29, length: 6 } ]
*/
```
npm package: @k14v/rexpmat
Description: Create regular expression from string using printf format
Latest version: 0.0.3

# rexpmat
Create regular expression from string using sprintf format and handlebars


http://www.cplusplus.com/reference/cstdio/printf/

%[flags][width][.precision][length]specifier 

specifier	Output	Example
d or i	Signed decimal integer	392
u	Unsigned decimal integer	7235
o	Unsigned octal	610
x	Unsigned hexadecimal integer	7fa
X	Unsigned hexadecimal integer (uppercase)	7FA
f	Decimal floating point, lowercase	392.65
F	Decimal floating point, uppercase	392.65
e	Scientific notation (mantissa/exponent), lowercase	3.9265e+2
E	Scientific notation (mantissa/exponent), uppercase	3.9265E+2
g	Use the shortest representation: %e or %f	392.65
G	Use the shortest representation: %E or %F	392.65
a	Hexadecimal floating point, lowercase	-0xc.90fep-2
A	Hexadecimal floating point, uppercase	-0XC.90FEP-2
c	Character	a
s	String of characters	sample
p	Pointer address	b8000000
n	Nothing printed.
The corresponding argument must be a pointer to a signed int.
The number of characters written so far is stored in the pointed location.
%	A % followed by another % character will write a single % to the stream.	%