Interpolation placeholder character
Opening and closing interpolation parentheses
Converts all non-letter and non-printable characters in s
to their escape codes.
Converts all non-letter and non-printable characters in s
to their escape codes.
Raw string to escape
Escaped version of s
Extracts all referred variables from string and returns a Set
with names.
Extracts all referred variables from string and returns a Set
with names.
Interpolation string
Set of variable names referred in msg
Replaces all occurences of placeholders like %(var)
to corresponding variables in args
with respect to
specified OutputFormat
(all placeholders will be escaped).
Replaces all occurences of placeholders like %(var)
to corresponding variables in args
with respect to
specified OutputFormat
(all placeholders will be escaped). %
can be escaped as %%
. Note: for performance
reasons this function will not use any Map
s to index variables, it will use linear search every time it
encounters a variable.
Result type
Interpolation string
Interpolation variables
Desired OutputFormat
summoned implicitly
Interpolation result wrapped by OutputFormat
Convert escape sequences like \\n
to their meanings.
Convert escape sequences like \\n
to their meanings. Differs from StringContext.treatEscapes
because latter
does not handle \\uXXXX
escape codes.
String with literal escape codes
s
having escape codes replaced with their meanings.
Provides various string functions that are useful both in macros and in I18n code, such as string interpolations, escaping and unescaping.