Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: uint2str #3013

Merged
merged 2 commits into from
Jul 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/built-in-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,26 @@ Data Manipulation
Returns a value of the type specified by ``type_``.

For more details on available type conversions, see :ref:`type_conversions`.

.. py:function:: uint2str(value: uint256) -> String
transmissions11 marked this conversation as resolved.
Show resolved Hide resolved

Returns an unsigned integer's string representation.

* ``value``: Unsigned integer to convert.

Returns the string representation of ``value``.

.. code-block:: python

@external
@view
def foo(b: uint256) -> String[78]:
return uint2str(b)

.. code-block:: python

>>> ExampleContract.foo(420)
"420"

.. py:function:: extract32(b: Bytes, start: uint256, output_type=bytes32) -> Any

Expand Down