These functions use the printf
idiom to make it convenient to create structured Fleece values in memory with one call. More...
%
specifier appears.
va_list
.
va_list
.
These functions use the printf
idiom to make it convenient to create structured Fleece values in memory with one call.
They create or modify a FLMutableArray
or `FLMutableDict by reading the given format string and the following arguments.
The format string is basically JSON5, except that any value in it may be a printf-style '' specifier instead of a literal, in which case that value will be read from the next argument. The supported format specifiers are:
c
(cast the arg to char
to avoid a compiler warning)i
or d
(use size specifiers l
, ll
, or z
)u
(use size specifiers l
, ll
, or z
)f
(arg can be float
or double
; no size spec needed)s
%.*s
(takes two args, a const char*
and an int
. See FMTSLICE
.)p
(arg must be a FLValue
)%@
(Apple platforms only: arg must be a NSString
, NSNumber
, NSArray
, NSDictionary
, NSNull
, or equivalent CFTypeRef
)A -
can appear after the %
, indicating that the argument should be ignored if it has a default value, namely false
, 0, or an empty string. This means the corresponding item won't be written (a Dict item will be erased if it previously existed.)
If an argument is a NULL pointer nothing is written, and any pre-existing Dict item will be removed.
Like FLValue_NewWithFormat, except it operates on an existing mutable array.
The values parsed from the format string and arguments will be appended to it.
◆ FLMutableDict_UpdateWithFormat()Like FLValue_NewWithFormat, except it operates on an existing mutable dict.
(Pre-existing properties not appearing in the format string are preserved.)
◆ FLValue_NewWithFormat()Translates the JSON-style format string into a tree of mutable Fleece objects, adding values from the following arguments wherever a printf-style %
specifier appears.
FLMutableArray
or FLMutableString
depending on the syntax of the format string.
Variant of FLValue_NewWithFormat that takes a pre-existing va_list
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4