summaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md134
1 files changed, 116 insertions, 18 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 2cc11032b..60fb96ab3 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -5763,6 +5763,8 @@ AST elements (table)
<!-- END: AUTOGENERATED CONTENT -->
+<!-- BEGIN: AUTOGENERATED CONTENT for module pandoc.text -->
+
# Module pandoc.text
UTF-8 aware text manipulation functions, implemented in Haskell.
@@ -5778,52 +5780,115 @@ function Str (s)
end
```
-### fromencoding {#text.fromencoding}
+## Functions {#pandoc.text-functions}
+
+### fromencoding {#pandoc.text.fromencoding}
-`fromencoding(s, encoding)`
+`fromencoding (s[, encoding])`
Converts a string to UTF-8. The `encoding` parameter specifies the
encoding of the input string. On Windows, that parameter defaults
to the current ANSI code page; on other platforms the function
will try to use the file system's encoding.
-See [`toencoding`](#text.toencoding) for more info on supported
-encodings.
+The set of known encodings is system dependent, but includes at
+least `UTF-8`, `UTF-16BE`, `UTF-16LE`, `UTF-32BE`, and `UTF-32LE`.
+Note that the default code page on Windows is available through
+`CP0`.
+
+Parameters:
+
+`s`
+: string to be converted (string)
+
+`encoding`
+: target encoding (string)
+
+Returns:
+
+- UTF-8 string (string)
+
+*Since: 3.0*
+
+### len {#pandoc.text.len}
+
+`len (s)`
-### lower {#text.lower}
+Returns the length of a UTF-8 string, i.e., the number of
+characters.
+
+Parameters:
+
+`s`
+: UTF-8 encoded string (string)
+
+Returns:
+
+- length ([integer]{unknown-type="integer"}\|string)
+
+*Since: 2.0.3*
+
+### lower {#pandoc.text.lower}
`lower (s)`
Returns a copy of a UTF-8 string, converted to lowercase.
-### upper {#text.upper}
+Parameters:
-`upper (s)`
+`s`
+: UTF-8 string to convert to lowercase (string)
-Returns a copy of a UTF-8 string, converted to uppercase.
+Returns:
+
+- Lowercase copy of `s` (string)
-### reverse {#text.reverse}
+*Since: 2.0.3*
+
+### reverse {#pandoc.text.reverse}
`reverse (s)`
Returns a copy of a UTF-8 string, with characters reversed.
-### len {#text.len}
+Parameters:
+
+`s`
+: UTF-8 string to revert (string)
-`len (s)`
+Returns:
+
+- Reversed `s` (string)
+
+*Since: 2.0.3*
+
+### sub {#pandoc.text.sub}
+
+`sub (s, i[, j])`
+
+Returns a substring of a UTF-8 string, using Lua's string indexing
+rules.
+
+Parameters:
+
+`s`
+: UTF-8 string (string)
-Returns the length of a UTF-8 string.
+`i`
+: substring start position ([integer]{unknown-type="integer"})
+
+`j`
+: substring end position ([integer]{unknown-type="integer"})
-### sub {#text.sub}
+Returns:
-`sub (s)`
+- text substring (string)
-Returns a substring of a UTF-8 string, using Lua's string
-indexing rules.
+*Since: 2.0.3*
-### toencoding {#text.toencoding}
+### toencoding {#pandoc.text.toencoding}
-`toencoding(s, encoding)`
+`toencoding (s[, enc])`
Converts a UTF-8 string to a different encoding. The `encoding`
parameter defaults to the current ANSI code page on Windows; on
@@ -5834,6 +5899,39 @@ least `UTF-8`, `UTF-16BE`, `UTF-16LE`, `UTF-32BE`, and `UTF-32LE`.
Note that the default code page on Windows is available through
`CP0`.
+Parameters:
+
+`s`
+: UTF-8 string (string)
+
+`enc`
+: target encoding (string)
+
+Returns:
+
+- re-encoded string (string)
+
+*Since: 3.0*
+
+### upper {#pandoc.text.upper}
+
+`upper (s)`
+
+Returns a copy of a UTF-8 string, converted to uppercase.
+
+Parameters:
+
+`s`
+: UTF-8 string to convert to uppercase (string)
+
+Returns:
+
+- Uppercase copy of `s` (string)
+
+*Since: 2.0.3*
+
+<!-- END: AUTOGENERATED CONTENT -->
+
# Module pandoc.template
Handle pandoc templates.