Documentation

class DeferredString

An object that encapsulates a string, evaluated only when needed.

class DeferredString extends String;

Description

This class is primarily used for string formatting and localization, usually as the result of a call to fmt or to process string-formatted bindings.

Each instance encapsulates an input string, possibly with format placeholders. The string is translated if possible, and cached until the cache is invalidated (e.g. when the application I18n provider is changed).

The format() method returns a new instance, where the input string is formatted with the provided values before caching.

Constructor

Type members

Static members

Instance members

Related