Char
Generate single-character values.
hexa
One lowercase hexadecimal character — ie.: one character in 0123456789abcdef
.
Signatures:
fc.hexa()
— deprecated since v3.22.0 (more details at #5233)
Usages:
fc.hexa();
// Examples of generated values: "5", "f", "7", "d", "9"…
Resources: API reference.
Available since 0.0.1.
base64
One base64 character — ie.: one character in A-Z
, a-z
, 0-9
, +
or /
.
Signatures:
fc.base64()
— deprecated since v3.22.0 (more details at #5233)
Usages:
fc.base64();
// Examples of generated values: "A", "H", "i", "l", "7"…
Resources: API reference.
Available since 0.0.1.
char
One printable character — ie.: one character between 0x20
(included) and 0x7e
(included), corresponding to printable characters (see https://www.ascii-code.com/).
Signatures:
Usages:
fc.char();
// Examples of generated values: "{", "x", "N", "8", "m"…
Resources: API reference.
Available since 0.0.1.
ascii
One ascii character — ie.: one character between 0x00
(included) and 0x7f
(included).
Signatures:
Usages:
fc.ascii();
// Examples of generated values: "4", "l", "S", ";", "\u0019"…
Resources: API reference.
Available since 0.0.1.
unicode
One unicode character from BMP-plan — ie.: one character between 0x0000
(included) and 0xffff
(included) but excluding surrogate pairs (between 0xd800
and 0xdfff
).
Generate any character of UCS-2 which is a subset of UTF-16 (restricted to BMP plan).
Signatures:
Usages:
fc.unicode();
// Examples of generated values: "⬑", "", "叾", "", "$"…
Resources: API reference.
Available since 0.0.11.
char16bits
One unicode character from BMP-plan (including part of surrogate pair) — ie.: one character between 0x0000
(included) and 0xffff
(included).
Generate any 16 bits character. Be aware the values within 0xd800
and 0xdfff
which constitutes the surrogate pair characters are also generated meaning that some generated characters might appear invalid regarding UCS-2 and UTF-16 encoding.
Signatures:
fc.char16bits()
— deprecated since v3.22.0 (more details at #5233)
Usages:
fc.char16bits();
// Examples of generated values: "", "毒", "丬", "縻", "贑"…
Resources: API reference.
Available since 0.0.11.
fullUnicode
One unicode character — ie.: one character between 0x0000
(included) and 0x10ffff
(included) but excluding surrogate pairs (between 0xd800
and 0xdfff
).
Its length can be greater than one as it potentially contains multiple UTF-16 characters for a single glyph (eg.: "\u{1f434}".length === 2
).
Signatures:
Usages:
fc.fullUnicode();
// Examples of generated values: "", "#", "", "", ""…
Resources: API reference.
Available since 0.0.11.