A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://couchbase.github.io/couchbase-lite-core/C/html/group__builder.html below:

LiteCore: Fleece Formatted Value Builder

These functions use the printf idiom to make it convenient to create structured Fleece values in memory with one call. More...

NODISCARD FLEECE_PUBLIC FLValue  FLValue_NewWithFormat (const char *format,...) __printflike(1   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.
  NODISCARD FLEECE_PUBLIC FLValue NODISCARD FLEECE_PUBLIC FLValue  FLValue_NewWithFormatV (const char *format, va_list args)   Variant of FLValue_NewWithFormat that takes a pre-existing va_list.
  FLEECE_PUBLIC void  FLMutableArray_UpdateWithFormat (FLMutableArray, const char *format,...) __printflike(2   Like FLValue_NewWithFormat, except it operates on an existing mutable array.
  FLEECE_PUBLIC void FLEECE_PUBLIC void  FLMutableDict_UpdateWithFormat (FLMutableDict, const char *format,...) __printflike(2   Like FLValue_NewWithFormat, except it operates on an existing mutable dict.
  FLEECE_PUBLIC void FLEECE_PUBLIC void FLEECE_PUBLIC void  FLValue_UpdateWithFormatV (FLValue, const char *format, va_list args)   Like FLMutableArray_UpdateWithFormat / FLMutableDict_UpdateWithFormat but takes a pre-existing 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:

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.

Note
It's legal for a dict key to be repeated; later occurrences take precedence, i.e. each one overwrites the last.
◆ FLMutableArray_UpdateWithFormat()

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.

Note
The result will be either an FLMutableArray or FLMutableString depending on the syntax of the format string.
Warning
The returned value must be released when you're done with it.
◆ FLValue_NewWithFormatV()

Variant of FLValue_NewWithFormat that takes a pre-existing va_list.

Warning
The returned value must be released when you're done with it.
◆ FLValue_UpdateWithFormatV()

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