From f7d80b53e6606181c11d18784f4c786500a4a082 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 5 Mar 2021 17:03:59 +0530 Subject: [PATCH] string changes --- manual/template_lang.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manual/template_lang.rst b/manual/template_lang.rst index 5d5b0519a2..46b181f459 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -134,7 +134,7 @@ The functions intended for use in Single Function Mode are listed below. Note: t * ``uppercase()`` -- returns the value of the field in upper case. * ``titlecase()`` -- returns the value of the field in title case. * ``capitalize()`` -- returns the value with the first letter upper case and the rest lower case. - * ``contains(pattern, text if match, text if not match)`` -- checks if the field's value is matched by the regular expression ``pattern``. Returns ``text if match`` if if the pattern matches the value, otherwise it returns ``text if no match``. + * ``contains(pattern, text if match, text if not match)`` -- checks if the field's value is matched by the regular expression ``pattern``. Returns ``text if match`` if the pattern matches the value, otherwise it returns ``text if no match``. * ``count(separator)`` -- interprets the value as a list of items separated by ``separator`` and returns the number of items in the list. Most lists use a comma as the separator, but ``authors`` uses an ampersand (&). Examples: ``{tags:count(,)}``, ``{authors:count(&)}``. Aliases: ``count()``, ``list_count()`` * ``format_number(template)`` -- interprets the value as a number and formats that number using a Python formatting template such as ``"{0:5.2f}"`` or ``"{0:,d}"`` or ``"${0:5,.2f}"``. The formatting template must begin with ``{0:`` and end with ``}`` as in the above examples. Exception: you can leave off the leading "{0:" and trailing "}" if the format template contains only a format. See the template language and the `Python documentation `_ for more examples. Returns the empty string if formatting fails. * ``human_readable()`` -- expects the value to be a number and returns a string representing that number in KB, MB, GB, etc.