Commit 3482fa99 authored by Nils Goroll's avatar Nils Goroll

streamline doc formatting

- it's implicit that the description is the description and we got
  no other subsections but the example

- the prototype is generated by vmodtool already
parent e6ec6245
Pipeline #14 skipped
...@@ -165,11 +165,10 @@ uppercase, respectively. ...@@ -165,11 +165,10 @@ uppercase, respectively.
$Function BLOB decode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, $Function BLOB decode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD,
HEX, URL} decoding="IDENTITY", STRING_LIST encoded) HEX, URL} decoding="IDENTITY", STRING_LIST encoded)
Description Returns the BLOB derived from the string ``encoded`` according to the
Returns the BLOB derived from the string ``encoded`` scheme specified by ``decoding``.
according to the scheme specified by ``decoding``.
``decoding`` defaults to IDENTITY ``decoding`` defaults to IDENTITY
Example:: Example::
...@@ -186,20 +185,18 @@ $Function BLOB decode_n(INT n, ...@@ -186,20 +185,18 @@ $Function BLOB decode_n(INT n,
BASE64URLNOPAD, HEX, URL} decoding="IDENTITY", BASE64URLNOPAD, HEX, URL} decoding="IDENTITY",
STRING_LIST encoded) STRING_LIST encoded)
Description Same as ``decode()``, but only decode the first ``n`` characters of
Same as ``decode()``, but only decode the first ``n`` characters the decoded string. If ``n`` is greater than the length of the string,
of the decoded string. If ``n`` is greater than the length of then return the same result as ``decode()``.
the string, then return the same result as ``decode()``.
$Function STRING encode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, $Function STRING encode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD,
HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY", HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY",
BLOB blob) BLOB blob)
Description Returns a string representation of the BLOB ``blob`` as specifed by
Returns a string representation of the BLOB ``blob`` as ``encoding``.
specifed by ``encoding``.
``encoding`` defaults to IDENTITY ``encoding`` defaults to IDENTITY
Example:: Example::
...@@ -222,13 +219,12 @@ $Function STRING transcode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, ...@@ -222,13 +219,12 @@ $Function STRING transcode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD,
HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY", HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY",
STRING_LIST encoded) STRING_LIST encoded)
Description Translates from one encoding to another, by first decoding the string
Translates from one encoding to another, by first decoding ``encoded`` according to the scheme ``decoding``, and then returning
the string ``encoded`` according to the scheme ``decoding``, the encoding of the resulting blob according to the scheme
and then returning the encoding of the resulting blob ``encoding``.
according to the scheme ``encoding``.
``decoding`` and ``encoding`` default to IDENTITY ``decoding`` and ``encoding`` default to IDENTITY
Example:: Example::
...@@ -254,14 +250,12 @@ $Function STRING transcode_n(INT n, ...@@ -254,14 +250,12 @@ $Function STRING transcode_n(INT n,
HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY", HEXUC, HEXLC, URLUC, URLLC} encoding="IDENTITY",
STRING_LIST encoded) STRING_LIST encoded)
Description Same as ``transcode()``, but only from the first ``n`` characters of
Same as ``transcode()``, but only from the first ``n`` characters the encoded string.
of the encoded string.
$Function STRING version() $Function STRING version()
Description Returns the version string for this VMOD.
Returns the version string for this VMOD.
Example:: Example::
...@@ -271,13 +265,8 @@ $Object blob(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, HEX, ...@@ -271,13 +265,8 @@ $Object blob(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, HEX,
URL} decoding="IDENTITY", URL} decoding="IDENTITY",
STRING_LIST encoded) STRING_LIST encoded)
Prototype:: Creates an object that contains the BLOB derived from the string
``encoded`` according to the scheme ``decoding``.
new OBJ = blobcode.blob(ENUM decoding, STRING_LIST encoded)
Description
Creates an object that contains the BLOB derived from the
string ``encoded`` according to the scheme ``decoding``.
Example:: Example::
...@@ -291,8 +280,7 @@ Example:: ...@@ -291,8 +280,7 @@ Example::
$Method BLOB .get() $Method BLOB .get()
Description Returns the BLOB created by the constructor.
Returns the BLOB created by the constructor.
Example:: Example::
...@@ -308,9 +296,8 @@ Example:: ...@@ -308,9 +296,8 @@ Example::
$Method STRING .encode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, HEXUC, $Method STRING .encode(ENUM {IDENTITY, BASE64, BASE64URL, BASE64URLNOPAD, HEXUC,
HEXLC, URLUC, URLLC} encoding="IDENTITY") HEXLC, URLUC, URLLC} encoding="IDENTITY")
Description Returns an encoding of BLOB created by the constructor, according to
Returns an encoding of BLOB created by the constructor, the scheme ``encoding``.
according to the scheme ``encoding``.
Example:: Example::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment