Skip to content

Commit

Permalink
update utils doc to include stripHexPrefix method
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinYardi committed Nov 10, 2020
1 parent 979f8ea commit 0d256cf
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/web3-utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,37 @@ Example
web3.utils.randomHex(0)
> "0x"
------------------------------------------------------------------------------

stripHexPrefix
=====================

.. code-block:: javascript
web3.utils.stripHexPrefix(hexStr)
Returns the corresponding string without 0x prefix.

----------
Parameters
----------

1. ``hexStr`` - ``string``: Input string

-------
Returns
-------

``String``: The input string without 0x prefix.

-------
Example
-------

.. code-block:: javascript
web3.utils.stripHexPrefix('0x1234567890')
> "1234567890"
Expand Down

0 comments on commit 0d256cf

Please sign in to comment.